Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

if I do it this way: it works

DocumentRoot /var/www
<Directory />
        Options FollowSymLinks
        AllowOverride None
</Directory>
<Directory /var/www>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
</Directory>

drwxr-xr-x  2 root root     4096 nov  6 15:27 www

but if I do this: does not work

DocumentRoot /home/diego/web_server
<Directory />
        Options FollowSymLinks
        AllowOverride None
</Directory>
<Directory /home/diego/web_server>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
</Directory>


drwxr-xr-x 2 root root 4096 mar  4 15:40 web_server 

I'm doing wrong?

share|improve this question

2 Answers 2

If there isn't an index file (index.html) in /home/diego/web_server and want to get a directory listing, autoindex module must be enabled:

sudo a2enmod autoindex
sudo service apache2 restart

If there is an index file, check its permision, should be 644 (-rw-r--r--).

Check also your home (/home/diego) permissions, it should be 755 (drwxr-xr-x) just like www and web_server.

share|improve this answer
  1. Check /home permissions, should be 755 (drwxr-xr-x)
  2. Check /home/diego permissions, should be 755 (drwxr-xr-x), if not, do chmod
  3. Check /home/diego/web_server, should be 755 (drwxr-xr-x), if not, do chmod

Try now, above 403 (Forbidden) error should not be there.

share|improve this answer

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.