[LUNI] Which cgi-bin in Ubuntu?

Ramin K ramin-list at badapple.net
Wed Oct 13 22:34:57 CDT 2010


On 10/13/2010 8:16 PM, Clyde Forrester wrote:
> I am about to attempt primitive web experiments with Perl, and I've hit
> a snag. I'm using Ubuntu Linux 9.10 and Apache2. The general area for
> the server is in /var/www/, but the cgi-bin directory is in /usr/lib/.
>
> The two recommendations I've found by Googling are: 1. edit
> /etc/apache2/httpd.conf, or 2. create a symlink.
>
> Does anyone here have any strong opinions on this matter? Casual
> guesses? Reasonable advice?
>
> Clyde

Couple of sysadminy things to think about.

1. Don't mess with the system config files like httpd.conf. Instead 
create your own config in /etc/apache/sites-available/my.site.com.conf 
and then enable it. Makes updates simpler and it's easier to track your 
changes.

2. Don't worry about using the cgi directory. You'll likely want to keep 
all your application files together. Like this.

<Directory /var/www/my.site.com/cgi>
     AddHandler cgi-script .pl
     Options ExecCGI Indexes FollowSymLinks MultiViews
     AllowOverride None
     Order deny,allow
     Deny from all
</Directory>

Ramin


More information about the LUNI mailing list