Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 stackoverflow.com Jun 14 '10 at 3:32

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

2 Answers 2

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. –  jollypianoman Jun 14 '10 at 17:26
    
You'll want to turn on the Indexes option. Docs: httpd.apache.org/docs/2.2/mod/core.html#options (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 127.0.0.1
</Directory>
share|improve this answer
    
where is the httpd.conf file located? –  jollypianoman 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? –  jollypianoman Jun 14 '10 at 17:35

Your Answer

 
discard

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.