[lug] cgi-bin Apache

John Starkey jstarkey at advancecreations.com
Sun Dec 10 18:25:43 MST 2000


> Interestingly enough (or maybe not), a search at apache.org fails to
> find anything related to mod_userdir, yet it is in my httpd.conf by
> default.

The mods are listed by themselves. Not sure why the search wouldn't return
it. httpd.apache.org/docs lists the reference materials and half way down
on the left is a link to the mods.

> ScriptAlias /~web_user/cgi-bin/ "/home/home2/web_user/cgi-bin/"
> <Directory "/home/home2/web_user/cgi-bin">
>     AllowOverride Options
>     Options +ExecCGI
>     Order allow,deny
>     Allow from all 
> </Directory>
> 
> The 2 tricks were that (1) ScriptAlias can't be added within a
> <Directory...> </Directory> tag pair, nor within a .htaccess, and must
> be added globally in the main httpd.conf; and (2) Naming /cgi-bin/ has
> no effect if it is prefixed by ~web_user...I had to name it fully as
> "/~web_user/cgi-bin/". So now I can do this:
> http://localhost/~web_user/cgi-bin/test.cgi

Thanks for sending the solution.

> Try deleting the last line of your cgi script (assuming it is blank), or
> appending a new line in vi and writing.

The script is working in my VirtualHost cgi-bins though. I'll try this.

> You've been quite helpful, thanks! I am still curious about the
> mod_userdir though. Since I couldn't find it listed at apache.org, let
> me know if you find any other web links to configuring it.

httpd.apache.org/docs/mod/mod_userdir.html 

There are a lot of resources out there. So many that I forgot I bought
Apache Unleashed. Watch out for the last mod dates.

Thanks again.

John





More information about the LUG mailing list