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.

I just installed apache2 no my clean ubuntu 12.10 install (64-bit)

I installed it, copied the /etc/apache2/sites-available/default to /etc/apache2/sites-available/afflicto

Here's the contents of "afflicto" site

<VirtualHost *:80>
ServerAdmin webmaster@localhost

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

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
    AllowOverride None
    Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    Order allow,deny
    Allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

And of course, I opened nautilus, navigated to my home directory for the user "afflicto", which is me and created the www folder as well as some html files.

Then of course I:

sudo a2dissite default && sudo a2ensite afflicto

But no..

403 Forbidden

I'm sure this is a simply issue but I'm not very good at this :P

Thanks in advance.

share|improve this question

1 Answer 1

How to debug the issue

  • Please increase the LogLevel to at least info or better debug.
  • Please investigate the error log.
  • Please provide detailed information about the url you want to access.

Most likely problem

The apache httpd server process run as user www-data in group www-data. Can this user access the document behind your url ?

Note

  1. You may also want to have a look for mod_userdir

    This module allows user-specific directories to be accessed using the http://example.com/~user/ syntax.

  2. A normal site DocumentRoot shouldn't be below the home directory of a normal user. This may lead to security degradation introduced by a slightly misconfiguration.

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.