Trouts Posted August 29, 2008 Share Posted August 29, 2008 Hello, I have 2 apparently similar directories working with alias, one works, other doesn't.... ** on httpd.conf NameVirtualHost *:80 NameVirtualHost host_ip:80 #NameVirtualHost * <VirtualHost host_ip:80> ServerName mydomain.com DocumentRoot /var/www/html ServerAdmin mymail@gmail.com Alias /gestix /home/gnet Alias /gestix2 /home/gnet2 </VirtualHost> <VirtualHost *:80> ServerName mydomain.com DocumentRoot /var/www/html ServerAdmin mymail@gmail.com Alias /gestix /home/gnet/html Alias /gestix2 /home/gnet2 </VirtualHost> No other references to these directories/paths No external includes for httpd.conf ** ls -lisa for both dirs [root@... ]# ls -lisa /home/gnet total 120 18366466 8 drwxr-xr-x 12 root root 4096 Jun 17 06:32 . 18366465 8 drwxr-xr-x 4 root root 4096 Aug 29 05:53 .. 18366468 8 drwxr-xr-x 2 root root 4096 Jun 16 13:33 bin 18366471 8 drwxr-xr-x 2 root root 4096 Jun 16 13:41 cgi-bin 18366478 8 drwxr-xr-x 2 root root 4096 Jun 16 13:34 data 18366467 12 -rwxr-xr-x 1 root root 6148 Jun 16 13:33 .DS_Store 18366504 8 drwxr-xr-x 2 root root 4096 Jun 16 13:35 fonts 18366532 8 drwxr-xr-x 12 root root 4096 Jun 16 13:36 html 18366599 8 drwxr-xr-x 4 root root 4096 Jun 16 13:37 images 18366713 8 drwxr-xr-x 2 root root 4096 Jun 16 13:38 includes 18366842 4 -rwxr-xr-x 1 root root 0 Jun 16 13:58 index.html 18366815 8 -rwxr-xr-x 1 root root 17 Jun 16 13:38 install.sh 18366816 8 drwxr-xr-x 2 root root 4096 Jun 16 13:38 lang 18366826 8 drwxr-xr-x 2 root root 4096 Jun 16 14:15 lib 18366837 8 drwxr-xr-x 2 root root 4096 Jun 16 14:17 temp [root@... gestix]# ls -lisa /home/gnet2 total 20 18366843 8 drwxr-xr-x 2 root root 4096 Aug 29 05:56 . 18366465 8 drwxr-xr-x 4 root root 4096 Aug 29 05:53 .. 3637252 4 -rw-r--r-- 1 root root 0 Aug 29 06:08 index.html ** other info both the index.html files are copies. mydomain.com/gestix2/index.html works as expected, mydomain.com/gestix/index.html doesn't (403 Forbidden). content on /home/gnet is an installed application. relevant content on /etc/httpd/logs/error_log Fri Aug 29 06:37:20 2008] [error] [client my_ip] (13)Permission denied: access to /gestix/index.html denied Is there any permissions setting i am missing? Thank you. Quote Link to comment Share on other sites More sharing options...
steviewdr Posted August 29, 2008 Share Posted August 29, 2008 Try removing the following as its not needed: <VirtualHost *:80> ServerName mydomain.com DocumentRoot /var/www/html ServerAdmin mymail@gmail.com Alias /gestix /home/gnet/html Alias /gestix2 /home/gnet2 </VirtualHost> It could be "Alias /gestix /home/gnet/html" which ic confusing things. -steve Quote Link to comment Share on other sites More sharing options...
Trouts Posted August 31, 2008 Author Share Posted August 31, 2008 i've changed it and test bit more thoroughly and found out this: these files are simple empty copies: /home/gnet/index.html /home/gnet/public_html/index.html I've "chmod -R 755 /home/gtest" just to be sure. i took the problem to the simplest case and found out "Alias /gtest/ /home/gtest/" works fine, but if i change it to "Alias /gtest/ /home/gtest/public_html/" it gives forbidden; if i use the first Alias "Alias /gtest/ /home/gtest/" i can't access mydomain.com/public_html/index.html. Apparently all subfolders under /home/user/ are not acessible, even through aliases, there are no relevant Directory clauses and i have no idea how. Any ideas? relevant information in httpd.conf DocumentRoot "/var/www/html" <Directory /> Options FollowSymLinks AllowOverride All </Directory> <Directory "/var/www/html"> Options All AllowOverride None Order allow,deny Allow from all </Directory> <IfModule mod_userdir.c> UserDir disable #UserDir public_html </IfModule> DirectoryIndex index.htm index.html index.shtml index.xhtml index.wml index.perl index.pl index.plx index.ppl index.cgi index.jsp index.js index.jp index.php4 index.php3 index.php index.phtml default.htm default.html home.htm index.php5 Default.html Default.htm home.html AccessFileName .htaccess <Files ~ "^\.ht"> Order allow,deny Deny from all </Files> NameVirtualHost my_ip:80 <VirtualHost my_ip:80> ServerName mydomain.com DocumentRoot /var/www/html ServerAdmin mymail@gmail.com Alias /gtest/ /home/gtest/ #/home/gtest/public_html/ does not work here #i''ve tried setting a directory clause here to remove forbidden... doesnt work #<Directory "/home/gtest/public_html/"> # Options All # AllowOverride None # Order allow,deny # Allow from all #</Directory> </VirtualHost> Quote Link to comment Share on other sites More sharing options...
Trouts Posted September 9, 2008 Author Share Posted September 9, 2008 For the record, this was a SELinux configuration problem in Red Hat Enterprise 4. I had to give httpd access to the folder using $chcon -R -t httpd_sys_content_t /var/www/html/gnet Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.