[H-GEN] Apache Question

Joel Michael joel at jmichael.bpa.nu
Thu Aug 7 06:41:45 EDT 2003


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

On Thu, 2003-08-07 at 19:14, Andrew Pullin wrote:
>     I am almost there with my Apache problem. I can now serve pages from a
> user directory, but at present I cannot either look at the files in that
> directory by just trying to browse http://myserver/~user/ or run cgi
> scripts. I have attached my httpd.conf file (all of it in case there is
> something I missed). I checked the Apache pages as some of you suggested
> (thanks people), and have made adjustments to UserDir (somewhere in the
> middle of httpd.conf) and also Directory (right at the end of httpd.conf).
> The values I have used are the ones suggested by the Apache docs. I have
> turned off .htaccess using AllowOverride None, and also allowed cgi scripts
> as suggested by the Apache docs.

Ok, let's go through this.

> # Generated automatically... if you edit manually, the changes will be
lost
> # the next time you run "apacheconfig".

uh-oh.  This may explain some of the brain damage later on.

> <IfModule mod_userdir.c>
>     UserDir /home/admin/*/public_html
> </IfModule>
> 
Ok, I'm pretty sure this is meant to be just public_html, not
/home/admin/*/public_html.

> DirectoryIndex
> 
This should probably be:

DirectoryIndex index.html

at least.
> <VirtualHost *>
>   ServerSignature email
>  DirectoryIndex  index.php index.html index.htm index.shtml
>   LogLevel  warn
>   HostNameLookups off
> </VirtualHost>
> 
Er, this doesn't look right.  I'd probably completely remove this if
you're not actually using it, and move the configuration directives
specified in this virtual host back up into the main configuration file
(or just remove the VirtualHost lines, but you may be in for a world of
hurt down the track when you change the config directive at the top of
the file and it doesn't work properly)

> <Directory /home/admin/*/public_html>
>   AllowOverride None
>   Allow from from All
> </Directory>
> <Directory /home/admin/*/public_html/cgi-bin/>
>   Options ExecCGI
>   SetHandler cgi-script
> </Directory>
> 
Your home directories are /home/admin/<username>, right?  If not (no
version of Red Hat that I know of does it this way by default), then
change the above 2 paths to be the path of a user's home directory. 
E.g. Red Hat usually puts home directories under /home, so you would
want /home/*/public_html and /home/*/public_html/cgi-bin

And I'm sure you have double from's in your Allow From config
statements.  I'm also pretty sure that for every Allow statement, you
need a Order statement.

Hope that helps.  The Apache manual really is very good.
-- 
Joel Michael
This Linux guru needs work! http://jmichael.bpa.nu/resume.html

A. Because we read from left to right and from top to bottom!
Q. Why should I place my response below the quoted text?


--
* 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