A simple CGI question
Hi there, I have what i think is a really simple question regarding cgi scripts. I have an apache chpasswd cgi script that i want to make available so that users can browse to the url and change their own passwords. If a cgi script is in my /usr/local/www/cgi-bin directory, what url would i use to access the cgi from the web. Would i need to copy the cgi into my data directory? - i tried this and the browser treated it as a download. Please advise. Thanks! ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: A simple CGI question
If a cgi script is in my /usr/local/www/cgi-bin directory, what url would i use to access the cgi from the web. Would i need to copy the cgi into my data directory? - i tried this and the browser treated it as a download. I think we need a bit of your Apache configuration file to reply. Olivier ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: A simple CGI question
Gareth Bailey writes: GB If a cgi script is in my /usr/local/www/cgi-bin directory, what url GB would i use to access the cgi from the web. Would i need to copy the GB cgi into my data directory? - i tried this and the browser treated it GB as a download. It all depends on how you have Apache configured, but a typical configuration would require that you reference the CGI script with something like http://www.yourdomain.com/cgi-bin/mycgiprog.pl The extension on mycgiprog depends on what form the CGI takes; .pl is for Perl programs. Your Apache server has to be configured to either treat all files in a certain directory (usually cgi-bin) as executable programs, or to recognize certain extensions as executable programs, or both. Note that there are many security issues with providing something as sensitive as a password-changing program on your Web server, so take great care in your implementation. (And remember that Apache normally does not execute as root, so it cannot change passwords in executable CGI programs without special configuration.) -- Anthony ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: A simple CGI question
normally it would be http://ppp.yyy.com/cgi-bin/cgi-scriptname however, it depends on your scriptalias setting in the httpd.conf file. to access it as above, you would have something like: ScriptAlias /cgi-bin/ /usr/local/www/cgi-bin/ Directory /usr/local/www/cgi-bin AllowOverride None Options None Order allow,deny Allow from all /Directory Joseph. On Tue, 25 Jan 2005, Gareth Bailey wrote: Hi there, I have what i think is a really simple question regarding cgi scripts. I have an apache chpasswd cgi script that i want to make available so that users can browse to the url and change their own passwords. If a cgi script is in my /usr/local/www/cgi-bin directory, what url would i use to access the cgi from the web. Would i need to copy the cgi into my data directory? - i tried this and the browser treated it as a download. Please advise. Thanks! ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]