Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'This works...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
This works...
Authored by: Gee4orce on Sep 03, '01 11:53:53AM

Here's what I did (for username andy):

<pre>

<Directory "/Users/andy/Sites/">
Options Indexes MultiViews
AllowOverride all
Order allow,deny
Allow from all

</Directory>

AddHandler cgi-script .cgi .pl
<DirectoryMatch "^/Users/andy/Sites/?.*/cgi-bin/">
Options +ExecCGI -Indexes
SetHandler cgi-script
</DirectoryMatch>

</pre>

This turns on CGI executables (files with .cgi or .pl extensions) only in directories called 'cgi-bin' that live under andy's Sites folder (or subfolders thereof). It also turns of directory indexing (ie. listings) for these directories - good practice for hiding your cgi scripts from prying eyes.



[ Reply to This | # ]
This works...
Authored by: Vocal Velocity on Oct 15, '02 12:55:31PM

Upon following your example in changing the users.conf file and running apachectl configtest I received this syntax error:
Syntax error on line 11 of /private/etc/httpd/users/users.conf:
<DirectoryMatch not allowed here

My question is, where is the proper place to put the <DirectoryMatch?
also it did not like the <pre>



[ Reply to This | # ]