Apache Server configuration support - Problem with CGI permissions for user directories

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > February 2006 > Problem with CGI permissions for user directories





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Problem with CGI permissions for user directories
joe

2006-02-14, 6:02 pm

I'm a newbie to configuring a web server, so please forgive my
ignorance in advance...

I am trying to set up a webserver for local developement on a Mac G4,
and am having trouble getting CGI to work in the user directories. I am
confused by how apache distributes directives to various directories.

The default directory structure for Mac OS X is to put CGI's in
/Library/WebServer/CGI-Exectuables/test.cgi. When new users are added
to the machine, the are given their own web directory, i.e.
/Users/joe/Sites/.

I have a PERL script that works for 127.0.0.1/cgi-bin/test.cgi, but not
for 127.0.0.1/~joe/cgi-bin/test.cgi.

My apache error log says:
[Tue Feb 14 08:14:23 2006] [error] [client 127.0.0.1] Options ExecCGI
is off in this directory: /Users/joe/Sites/cgi-bin/first.cgi

Permissions for Library/WebServer/CGI-Exectuables/test.cgi and
/Users/joe/Sites/cgi-bin/ are 777.

I think the problem is somewhere in my directory configs. Apache has so
many, it's hard to know what's overriding what.

Here's the first directory directives in httpd.conf:

# First, we configure the "default" to be a very restrictive set of
# permissions.
#
<Directory />
Options FollowSymLinks
AllowOverride Options
</Directory>

Farther down, there's this, (I added ExecCGI and index.cgi):

# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#
<Directory /Users/*/Sites>
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch Includes ExecCGI
DirectoryIndex index.html index.cgi
<Limit GET POST OPTIONS PROPFIND>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS PROPFIND>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>

Then down at the bottom of the file is something I suspect was added
automatically when the user account was created:

Include /private/etc/httpd/users/*.conf

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

To further confuse things, there is another file
/etc/httpd/user/joe.conf that has additional user-directory directives:

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

Is there something in all these directory configurations that is
preventing the user from accessing cgi-bin? Can I add directives to an
..htaccess file in the user directory to cgi working?

joe

2006-02-17, 10:30 pm

I've got this figured out. Please ignore previous post.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com