Ubuntu – Apache2 setting up Problem with Ubuntu and PHP5

apache-2.2php5Ubuntu

[Solution] Removal of the .htaccess file in /var/www/.

Apache2, php5, Ubuntu- restarted, no firewall, but server not working. The access to http://IP/dir/index.html ignites the "Forbidden" message. Why do I get the error message?

Permissions

-rwxr-xr-x 1 root www 8643 2009-08-22 22:30 style.css
drwxr-sr-x 3 root www 4096 2009-08-22 22:30 views

error log

[Sun Aug 23 06:50:27 2009] [error] [client 212.246.212.212] client denied by server configuration: /var/www/codes/index.html 
[Sun Aug 23 06:50:31 2009] [error] [client 212.246.212.212] client denied by server configuration: /var/www/index.html

error

$ sudo service apache2 start
 * Starting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
   ...done.

Best Answer

The default config in/etc/apache2/sites-enabled/000-default should contain something like

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

Without the the relevant <directory> settings apache won't serve files from the directory. Check you haven't changed this, and if you have, please post what you have in 000-default.