Date: Tue, 25 Jan 2005 10:28:23 +0100 From: Anthony Atkielski <atkielski.anthony@wanadoo.fr> To: freebsd-questions@freebsd.org Subject: Re: A simple CGI question Message-ID: <1725708654.20050125102823@wanadoo.fr> In-Reply-To: <48a5f32a05012501075d2ebef5@mail.gmail.com> References: <48a5f32a05012501075d2ebef5@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1725708654.20050125102823>