Problems with Apache and 403 Forbidden error pages

I have a Linode with a LAMP environment under Ubuntu 10.04 LTS.

I had my LAMP running with no problems some hours ago, but now, I go to the main domain 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 file with that content:




DocumentRoot /srv/www/

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 works


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.

9 Replies

What happens if you go to

What does ls -l /srv/www/ show?

Can you show the 403 message from the error log?

Also the real domain would be helpful.

Thanks, obs

If I go directly to index.html I have the same problem.

The command :

ls -l /srv/www/

Gives me

-rw-r–r-- 1 root root 16 Jan 3 17:34 /srv/www/

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.

The file permissions are fine, to set up error logging add

ErrorLog "path/to/log/file"

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/ show? (maybe the directory permissions are wrong)

Set up error logging and see what it says.

Thanks a lot one more time, you are really helping me.

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 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/ so I don't know exactly what want to say the error.

The command you said, the ls -dl /srv/www/ it outputs:

drwxr-xr-x 2 root root 4096 Jan 3 17:34 /srv/www/

I don't see anything that makes me suspect.

The directory permissions are fine, the .htaccess file looks like a problem.

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.

Sorry but I created the /srv/www/.htaccess file and with 777 permissions for test purposes and the same error is showed on the error log and the 403 Forbidden in the navigator.

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.

I reinstalled apache and now it works.

Thanks for your help anyway!

Glad you got it fixed! If in doubt hit it with a hammer


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct