[H-GEN] Apache Question

Sarah Walters sarah at uow.edu.au
Thu Aug 7 19:07:28 EDT 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

On 07 Aug 2003 Andrew Pullin <andrew at hotspurbgc.com.au> wrote:
>     The two errors I get when I try to browse ~user/public_html and
> ~user/public_html/cgi-bin/ are:
> Directory index forbidden by rule: /home/user/public_html and
> public_html/cgi-bin,

I assume this is /home/admin/user/public_html

> The browser errors are an internal server error when I try to run a script
> directly, and an file does not exist error because it is looking at the
> public_html directory, not the public_html/cgi-bin directory and finally
> when I try to browse a directory I get a you don't have permission to access
> ~user on this server.
> 
> All permissions are set to drwxrwx0-x on public_html and cgi-bin. These
Keep in mind that you need drwxr-x--x on the home directories themselves too. 
And the scripts need to be readable and executable by the web server, so
generally world readable.

> ServerAdmin andrew at localhost
This is displayed on error pages given out by the server, so you might
wish to use a real email address. Of course, you might not :)

> # The path to the end user account 'public_html' directory must be
> # accessible to the webserver userid.  This usually means that ~userid
> # must have permissions of 711, ~userid/public_html must have permissions
> # of 755, and documents contained therein must be world-readable.
> # Otherwise, the client will only receive a "403 Forbidden" message.
> #
> # See also: http://httpd.apache.org/docs/misc/FAQ.html#forbidden
> #
> <IfModule mod_userdir.c>
>     #
>     # UserDir is disabled by default since it can confirm the presence
>     # of a username on the system (depending on home directory
>     # permissions).
>     #
>     #UserDir "disable"
> 
>     #
>     # To enable requests to /~user/ to serve the user's public_html
>     # directory, use this directive instead of "UserDir disable":
>     #
>     UserDir /home/admin/*/public_html
Try
UserDir enabled username1 username2
or
UserDir public_html

Mind you, the above should work.

> <Directory /home/admin/*/public_html>
>   AllowOverride None
>   Allow from from All
> </Directory>
You have two 'from's in that statement, that certainly won't work.

> <Directory /home/admin/*/public_html/cgi-bin/>
>   Options ExecCGI
>   SetHandler cgi-script
> </Directory>

Get rid of that trailing slash, that also won't work.

-- 
Mrs Sarah Walters
Systems Group
Information Technology Services
University of Wollongong
Phone: +61 2 4221 3775


--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list