netweblogic
2008-08-26, 05:36 AM CDT
I've got a bit of a pickle here:
I've got Fedora 9 on Windows VM, logged in as root. I'm just playing with it until we get our new server.
My apache setup seems to be working fine to a certain extent. I have set up test.lan on my windows machine to redirect to the VM IP (192.168.0.11) and can access it within my lan when accessing the default /var/www/html folder.
I have an index.php page showing phpinfo()
However, I set up a virtualhost and point test.lan to folder /var/www/vhosts/test.lan/httpdocs with the identical index.php page and I get a 403:
Forbidden
You don't have permission to access / on this server.
Apache/2.2.9 (Fedora) Server at test.lan Port 80
I then changed my virtualhost DocumentRoot to /var/www/html and it works fine. What could the problem be? I'll inform you of some of the steps I've already taken:
-Disabled SELinux
-tried setenforce 0
-tried setting the user and type contexts for selinux to duplicate the html folder in the httpdocs folder, test.lan and vhosts
-moved /var/www/html to /var/www/vhosts/test.lan/html to see if this folder still worked in a different location, but no luck
-change the document root to /var/www/vhosts/test.lan/httpdocs but no luck, and the html folder still works if defined in the virtualhost directive
None of these have had any effect, the only time it works is when the html folder is in it's original place, /var/www/html. It seems to me that from my experiments it's an issue with permissions in the filesystem so I give you a list of the html and httpdocs folders:
[root@localhost html]# ls -laZ
drwxr-xr-x root root system_u:object_r:httpd_sys_content_t:s0 .
drwxr-xr-x root root system_u:object_r:httpd_sys_content_t:s0 ..
-rw-r--r-- root root unconfined_u:object_r:httpd_sys_content_t:s0 index.php
[root@localhost html]# ls -laZ ../vhosts/test.lan/httpdocs
drwxr-xr-x root root system_u:object_r:httpd_sys_content_t:s0 .
drwxr-xr-x root root system_u:object_r:httpd_sys_content_t:s0 ..
-rw-r--r-- root root unconfined_u:object_r:httpd_sys_content_t:s0 index.php
Help!
I've got Fedora 9 on Windows VM, logged in as root. I'm just playing with it until we get our new server.
My apache setup seems to be working fine to a certain extent. I have set up test.lan on my windows machine to redirect to the VM IP (192.168.0.11) and can access it within my lan when accessing the default /var/www/html folder.
I have an index.php page showing phpinfo()
However, I set up a virtualhost and point test.lan to folder /var/www/vhosts/test.lan/httpdocs with the identical index.php page and I get a 403:
Forbidden
You don't have permission to access / on this server.
Apache/2.2.9 (Fedora) Server at test.lan Port 80
I then changed my virtualhost DocumentRoot to /var/www/html and it works fine. What could the problem be? I'll inform you of some of the steps I've already taken:
-Disabled SELinux
-tried setenforce 0
-tried setting the user and type contexts for selinux to duplicate the html folder in the httpdocs folder, test.lan and vhosts
-moved /var/www/html to /var/www/vhosts/test.lan/html to see if this folder still worked in a different location, but no luck
-change the document root to /var/www/vhosts/test.lan/httpdocs but no luck, and the html folder still works if defined in the virtualhost directive
None of these have had any effect, the only time it works is when the html folder is in it's original place, /var/www/html. It seems to me that from my experiments it's an issue with permissions in the filesystem so I give you a list of the html and httpdocs folders:
[root@localhost html]# ls -laZ
drwxr-xr-x root root system_u:object_r:httpd_sys_content_t:s0 .
drwxr-xr-x root root system_u:object_r:httpd_sys_content_t:s0 ..
-rw-r--r-- root root unconfined_u:object_r:httpd_sys_content_t:s0 index.php
[root@localhost html]# ls -laZ ../vhosts/test.lan/httpdocs
drwxr-xr-x root root system_u:object_r:httpd_sys_content_t:s0 .
drwxr-xr-x root root system_u:object_r:httpd_sys_content_t:s0 ..
-rw-r--r-- root root unconfined_u:object_r:httpd_sys_content_t:s0 index.php
Help!