You are not logged in.
hi, everyone, I encountered a weired apache problem.
Environment:
Archlinux 2.6.27
Apache 2.2.9-4
Problem:
I changed apache default DocumentRoot (/srv/http) to another place (/home/qianli/WWW/http), but I got Error 403 unless I used default. My httpd.conf below:
DocumentRoot "/home/qianli/WWW/http"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "/home/qianli/WWW/http">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<IfModule dir_module>
DirectoryIndex index.html index.htm index.php
</IfModule>
My files permissions:
qianli ~/WWW/http $ ll
total 32
drwxr-xr-x 6 qianli qianli 4096 2008-10-22 10:04 .
drwxr-xr-x 3 qianli qianli 80 2008-10-22 11:03 ..
drwxr-xr-x 10 qianli qianli 4096 2008-10-10 00:17 acquia
drwxr-xr-x 2 qianli qianli 1 2008-10-20 17:20 cgi-bin
-rw-r--r-- 1 qianli qianli 101 2008-10-22 10:04 index.html
drwxr-xr-x 2 qianli qianli 16 2008-10-21 17:26 logs
-rwxrwxrwx 1 qianli qianli 22 2008-10-21 14:19 phpinfo.php
lrwxrwxrwx 1 qianli qianli 20 2008-10-21 12:46 phpmyadmin -> /srv/http/phpMyAdmin
drwxr-xr-x 2 qianli qianli 24 2008-10-21 14:54 test
-rw-r--r-- 1 qianli qianli 113 2008-10-21 14:22 test.html
-rw-r--r-- 1 qianli qianli 8 2008-10-21 14:42 test.txt
Log:
[Wed Oct 22 10:43:32 2008] [error] [client 127.0.0.1] (13)Permission denied: access to / denied, referer: http://localhost/
[Wed Oct 22 10:43:33 2008] [error] [client 127.0.0.1] (13)Permission denied: access to / denied, referer: http://localhost/
[Wed Oct 22 10:51:15 2008] [error] [client 127.0.0.1] (13)Permission denied: access to / denied, referer: http://localhost/
I tried to change permission to 777, but I still got 403!
Last edited by qianli (2008-10-24 04:29:38)
Offline
Have you tried changing your /home/qianli/WWW/http to /home/qianli/public_html/http to see if it works?
Offline
@mycow,
Thanks. As you said, I changed /home/qianli/WWW/http to /home/qianli/public_html/http, but I still got 403 error.
Offline
have you enabled userdir or not? Can you send me your httpd.conf to check it out?
Offline
have you enabled userdir or not? Can you send me your httpd.conf to check it out?
@mycow,
OK, I will paste my httpd.conf tomorrow because it is in my another pc. Thank you
Offline
hello, mycow, you can see my httpd.conf at here: http://qianli.me/wp-content/uploads/httpd.conf.txt
Offline
Change the following
DocumentRoot "/home/qianli/WWW/http" to DocumentRoot "/home/qianli/public_html"
<Directory "/home/qianli/WWW/http"> to <Directory "/home/qianli/public_html">
ScriptAlias /cgi-bin/ "/home/qianli/WWW/http/cgi-bin/" to ScriptAlias /cgi-bin/ "/home/qianli/public_html/cgi-bin/"
<Directory "/home/qianli/WWW/http/cgi-bin"> to <Directory "/home/qianli/public_html/cgi-bin">
Create the folder public_html and tell me what errors do you get
Offline
@mycow, thanks. I did it as you said, but nothing changes:
Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
If you think this is a server error, please contact the webmaster.
Error 403
localhost
Thu Oct 23 16:54:49 2008
Apache/2.2.9 (Unix) mod_ssl/2.2.9 OpenSSL/0.9.8i DAV/2 mod_python/3.3.1 Python/2.5.2
Offline
Your home directory is likely to have 700 permissions. See here.
OMG, foutrelis, you are right! I never found my home directory is 700 permissions, now I change it and everything is OK! Thank you, foutrelis, thanks mycow, too
Offline