Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Problem with CGI permissions for user directories

 
   Web Hosting Problem Solving Community! (Home) -> Apache RSS
Next:  IIS 6.0 Always Hang  
Author Message
joe

External


Since: Feb 14, 2006
Posts: 4



(Msg. 1) Posted: Tue Feb 14, 2006 3:24 pm
Post subject: Problem with CGI permissions for user directories
Archived from groups: alt>apache>configuration (more info?)

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?

 >> Stay informed about: Problem with CGI permissions for user directories 
Back to top
Login to vote
joe

External


Since: Feb 14, 2006
Posts: 4



(Msg. 2) Posted: Thu Feb 16, 2006 3:08 pm
Post subject: Re: Problem with CGI permissions for user directories [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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

 >> Stay informed about: Problem with CGI permissions for user directories 
Back to top
Login to vote
Display posts from previous:   
   Web Hosting Problem Solving Community! (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]