apache2 help -Virtual Host-
Im in the process of setting up three virtualhost sites with apache 2 on freebsd 5.4.
Normally ( on linux ) I would just creat a group and user , for example www (user) and users (group) Then in the home directory of the new users www i would set-up the site architect as followed users -www /home/www/ --site one /home/www/site1 /home/www/site1/html <--web files /home/www/site1/cgi-bin <--virtual cgi-bin --site two /home/www/site2 /home/www/site2/html /home/www/site2/cgi-bin site-three /home/www/site3 /home/www/site3/html /home/www/site3/cgi-bin And the httpd.conf file looks like this <VirtualHost *> ServerName site1.com DocumentRoot /home/www/site1/html VirtualScriptAlias /home/www/site1/cgi-bin </VirtualHost> <--this two more times with the updated name,document root etc. Now everytime i try to view site1 i get a forbidden error message which leades me to believe that i had to chmod it down. so naturally i do. chmod 755 /home/www/site1/html *however that does not fix it so i tried to play around with the ownership with chown, but still no go. Any clue on what permission + owner/group the folders need to be so i can view my web content via the web? |
Are you running in a chrooted environment?
Are there any messages in the error_log file? |
Yes, the error in the error log is
Client Denied by server Config : /home/www/site1/html Client Denied by server Config : /home/www/site1/html/favico.ico Im searching around my .conf file to see if there is something i need to enable. No i do not believe im running a chrooted environment. So far its the basic install with apache2 nothing else modified but the httpd.conf and user/and directories of sites |
Could you post a copy of httpd.conf.
|
For permission bits -- You need at least 4 on files and 1 on directories (and the directories leading to that directory).
The user/group can be anything you want, but I normally do owner to the user's login name, and then group to the group apache runs as (normally www). That way you can just do a 750 recursively at the top level home directory. Also, at the risk of pointing out the obvious -- If you don't have +Indexes in your config someplace for the vhosts (or serverwide) you'll need an index.html or you'll get 403'd. |
All times are GMT -5. The time now is 02:12 PM. |