Help - Search - Members - Calendar
Full Version: Apache - Virtual Host Permissions
The Planet Forums > System Administration > Web Hosting
CypherSTL
Working on setting up a LAMP Server that will power internal websites at LAN Parties.

I have websites setup using the following directory structure:
CODE
       /home/cypher/public_html/site_www.stlouislan.lan
       /home/cypher/public_html/site_pointofsale.stlouislan.lan
      
       /home/admin1/public_html/site_admin.stlouislan.lan


Apache Configs
CODE
       NameVirtualHost *:80        
      
       # Default Page for IP-Only
       <VirtualHost *:80>
               ServerName 10.1.1.3
               DocumentRoot /var/www/html
       </VirtualHost>
      
       # Primary Intranet
         <Directory /home/cypher/public_html/site_www.stlouislan.lan>
           Order Deny,Allow
           Allow from all
         </Directory>
        
         <VirtualHost *:80>
                 ServerName www.stlouislan.lan
                 DocumentRoot /home/cypher/public_html/site_www.stlouislan.lan
         </VirtualHost>  
      
       # Point of Sale
         <Directory /home/cypher/public_html/site_pointofsale.stlouislan.lan>
           Order Deny,Allow
           Allow from all
         </Directory>
        
         <VirtualHost *:80>
                 ServerName pointofsale.stlouislan.lan
                 DocumentRoot /home/cypher/public_html/site_pointofsale.stlouislan.lan
         </VirtualHost>      
      
       # Primary Administration
         <Directory /home/admin1/public_html/site_admin.stlouislan.lan>
           Order Deny,Allow
           Allow from all
         </Directory>
        
         <VirtualHost *:80>
                 ServerName admin.stlouislan.lan
                 DocumentRoot /home/admin1/public_html/site_admin.stlouislan.lan
         </VirtualHost>


Apache is currently running as: apache / apache

I kept getting 403 Forbidden when accessing these sites, other than the default vHost of 10.1.1.3. I even went as far as to chmod 777 /home/USERNAME/public_html/* -R and I'm still getting the 403 Forbidden.

If I change apache to run as cypher / cypher, I can get to the domains that belong to that user, but get 403 Forbidden on "admin.stlouislan.lan"

The UserDir's won't work for me, as I am using Name-Based Virtual Hosts.

Can anyone help me get Apache configured to where I can access Web Directories in users home directories while still maintaining some type of security on those files.

Thank you!
eth00
What do the apache error logs say?
CypherSTL
QUOTE (eth00 @ Dec 27 2008, 10:48 AM) *
What do the apache error logs say?


CODE
[Tue Jan 06 05:43:15 2009] [error] [client 10.1.1.100] (13)Permission denied: access to / denied
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.