httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "RuneImp" <>
Subject Re: CGI Scripts
Date Thu, 10 Jan 2002 00:59:03 GMT
What I do on my server is leave cgi-bin alone for "public" CGI
scripts & use ScriptAlias inside the VirtualHost directives to
set /cgi/ as that domains "personal" cgi area.

ScriptAlias /cgi-bin/ "/usr/local/www/cgi-bin/"

        DocumentRoot /usr/home/
        ScriptAlias /cgi/ "/usr/home/"
        ErrorLog /usr/home/
        CustomLog /usr/home/ combined
        ThrottlePolicy Original 1M 10s
<Directory /usr/home/>
        Options Indexes Includes MultiViews

This way if you can access all public CGI scripts via

and accounts that have there own CGI scripts in there cgi
directory & can then only be accessed by that domain. In this
case and no other
domain on the server can access those scripts "accidentally" by
using a script of the same name in there cgi directory.

-=- RuneImp
ImpTech - Web Design, Hosting & Computer Tech

----- Original Message ----- 
From: "Joshua Slive" <>
To: <>
Sent: Wednesday, January 09, 2002 3:56 PM
Subject: RE: CGI Scripts

> From: Vernon A Webb []
> What I'm setting up is a web site for a customer who needs
> a CGI-BIN.
> I have created an ftp location for him at:
> /home/UserName/
> Also a web folder for:
> at:
> /home/UserName/www/
> He needs to have a cgi-bin to place his programs at
> /home/UserName/www/cgi-bin/
> Where he's trying to test:

That's better.  My recommendation is to remove the ScriptAlias from the main
server context and place it only in the vhost for (and any
other hosts that need it).  Then add

<Directory /home/UserName/www/cgi-bin/>
Options ExecCGI
SetHandler cgi-script

to you httpd.conf.  This has the same effect as ScriptAlias without the
Alias part, since the cgi-bin is already accessible under the documentroot.

If you don't want to do that, you can use
ScriptAlias /cgi-bin/ /home/UserName/www/cgi-bin/
inside the <VirtualHost> section for  But that can be a
little confusing because you are essentially aliasing a directory that is
already accessible.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message