0

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?

2 Answers 2

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.

2
  • I do have an index.html file in the www/ directory. How would I turn on directory indexing.
    – codedude
    Jun 14, 2010 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, 2010 at 17:34
1

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>
2
  • where is the httpd.conf file located?
    – codedude
    Jun 14, 2010 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, 2010 at 17:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .