Re: Web Server Issues Centos

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Craig White
Date:  
To: Main PLUG discussion list
Subject: Re: Web Server Issues Centos
On Wed, 2009-04-01 at 19:01 -0700, Gilbert T. Gutierrez, Jr. wrote:
> I am having a problem that for the life of me I cannot solve. I am setting
> up a basic web server on Centos5 duplicating a setup I have on Centos4. My
> old setup is on a slow server that has some hardware failing randomly.
>
> I have the standard apache setup that I have appended with the following
> information I have at the bottom of the email. When I try to access a basic
> index.html file that I created in the folder /home/gilbert/pub_html/html I
> get:
> "Forbidden
>
> You don't have permission to access / on this server.
> Apache/2.2.3 (CentOS) Server at www.test.net Port 80"
>
>
> SELinux is disabled
> Apache is set to debug on the logging
> The machine I have accessing the server has a modified hosts file pointing
> test.net and www.test.net to 172.16.5.134
> The error file gives me:
> "(13)Permission denied: access to / denied"
> The access file gives me:
> "GET / HTTP/1.1" 403 286
>
>
> If I remove my mods, and put a test index file into /var/www/html/, the
> system works fine (just no virtual hosts). I am puzzled since the server
> does not have any issues with my config file and the file is identical (with
> the exception that this file has only one virtual domain name and the ip) to
> my config file on my online server that contains multiple domains.
>
> Can someone lead me to the promiss land?
>
> Thanks,
> Gilbert
>
>
>
> ------------------ httpd.conf mod ------------------
>
> NameVirtualHost 172.16.5.134:80
>
> <Directory "/home/*/pub_html/html">
>     Options Indexes FollowSymLinks
>     AllowOverride AuthConfig
>     Order allow,deny
>     Allow from all
> </Directory>

>
> <Directory "/home/*/pub_html/cgi-bin">
>     AllowOverride AuthConfig
>     # AllowOverride None
>     Options None
>     Order allow,deny
>     Allow from all
> </Directory>

>
> <Directory "/home/*/pub_html/icons">
>     Options Indexes MultiViews
>     AllowOverride None
>     Order allow,deny
>     Allow from all
> </Directory>

>
>
> <VirtualHost 172.16.5.134:80>
>     ServerAdmin 
>     DocumentRoot /home/gilbert/pub_html/html
>     ServerName test.net
>     ServerAlias www.test.net
>     ScriptAlias /cgi-bin/ /home/gilbert/pub_html/cgi-bin/
>     Alias /icons/ /home/gilbert/pub_html/icons/
>     ErrorLog /var/log/httpd/test.net-error_log
>     CustomLog /var/log/httpd/test.net-access_log common
> </VirtualHost> 

----
Nothing says you can't do it this way (name based virtual hosts) but if
you look in /etc/httpd/conf/httpd.conf - you will find the line,

# UserDir: The name of the directory that is appended onto a user's home
    # of a username on the system (depending on home directory
#<Directory /home/*/public_html>


which is the apache standard way of serving users home directories.

Of course the 'apache' user must be able to descend and read the files
in the various /home/*/public_html directories as well.

Craig


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss