Problems with Apache and 403 Forbidden error pages
I had my LAMP running with no problems some hours ago, but now, I go to the main domain example.com and I always see the same 403 Forbidden Error.
It had a wordpress blog installed, but now, to test purpose I created a simple index.html with a message to view only if it works.
In my /etc/apache2/sites-available I have a example.com file with that content:
The directory exists and it have read permissions, etc.
I had reloaded and restarted the apache server several times. I had rebooted the machine also but anything seems work.
I followed your LAMP configuration guidelines and it worked for me, but now it doesn't.
I have every folder under www with read permissions and I don't have any .htaccess to deny the requests. I only have a .html file with a
It might be something about the apache2 main configuration, but I don't have so much knowledge to debug and fix that problem.
Thanks a lot.
What does ls -l /srv/www/example.com/public_html/index.html show?
Can you show the 403 message from the error log?
Also the real domain would be helpful.
If I go directly to index.html I have the same problem.
The command :
ls -l /srv/www/example.com/public_html/index.html
-rw-r–r-- 1 root root 16 Jan 3 17:34 /srv/www/example.com/public_html/index.html
The real domain name is deocultismo [dot] com
I hadn't set any error log at the moment, so I can't view it. I don't know exactly how to do it also.
In your virtual host. (normally a good place is /var/log/apache/domain.log) make sure whatever user apache runs as can write to the directory where the log is stored
What does ls -dl /srv/www/example.com/public_html/ show? (maybe the directory permissions are wrong)
Set up error logging and see what it says.
I had turned on the logging and I have some interesting data on it:
I have several lines with that data:
[Mon Jan 03 20:04:04 2011] [crit] client 126.96.36.199Permission denied: /srv/www/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
I don't have a .htaccess file at /srv/www/ because the DocumentRoot folder might be /srv/www/example.com/public_html so I don't know exactly what want to say the error.
The command you said, the ls -dl /srv/www/example.com/public_html/ it outputs:
drwxr-xr-x 2 root root 4096 Jan 3 17:34 /srv/www/example.com/public_html/
I don't see anything that makes me suspect.
Are you sure /srv/www/.htaccess doesn't exist?
You could just do
touch /srv/www/.htaccess to create a blank one see if it solves the issue.
I don't know what to do.
It could be possible to uninstall apache2 and reinstall it with all the configuration removed?
I have my installation with few customization because I installed it two days ago and I don't have anything important on it.
Thanks a lot.