Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed LAMP on Ubuntu 10.04. Now whenever I try to access http://localhost/ I get this message:

Forbidden You don't have permission to access / on this server. Apache/2.2.14 (Ubuntu) Server at localhost Port 80

I tried changing the permissions of the var/www/ folder by clicking ALT-f2, typing in "gksu nautilus" and right clicking the folder and changing the permissions but I still get a 403 forbidden error.

Any idea what's going on?

share|improve this question

migrated from Jun 14 '10 at 3:32

This question came from our site for professional and enthusiast programmers.

You likely don't have an index document and directory indexing isn't turned on for that directory. Try adding index.html to your web root directory.

share|improve this answer
I do have an index.html file in the www/ directory. How would I turn on directory indexing. – codedude Jun 14 '10 at 17:26
You'll want to turn on the Indexes option. Docs: (and there's an example of usage in @Mart's answer). – ceejayoz Jun 14 '10 at 17:34

Do check how your www folder is configured in the httpd.conf file too. Particularly this line (copied directly from my own home web-server):

<Directory "/var/www/">
Options Indexes FollowSymLinks
AllowOverride all
Order Deny,Allow
Deny from all
Allow from
share|improve this answer
where is the httpd.conf file located? – codedude Jun 14 '10 at 17:31
wait...I found it in /etc/apache2/ However, there's nothing in the text file. What should I do? – codedude Jun 14 '10 at 17:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.