Forbidden : You don't have permissions to access / on this server !

November 4, 2014 36.6k views

I previously had this error :
After following one of the answers I getting this error on accessing my website


You don't have permission to access / on this server.

Apache/2.4.7 (Ubuntu) Server at Port 80

Please help I can't access any post , page , Wordpress dashboard !

4 Answers

I found the solution !
Just add these lines

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    ServerName server_domain_name_or_IP
    <Directory /var/www/html/>
        AllowOverride All
    . . .

on this file sudo nano /etc/apache2/sites-available/000-default.conf
& then sudo a2enmod rewrite & then sudo service apache2 restart

Thanks !

Thank you for sharing this. helped me resolve after hours of troubleshooting!

I have modified 000-default.conf and it looks like this:

<VirtualHost *:80>

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html

    <Directory /var/www/signature/>
       AllowOverride All

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined


# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

and I ran the sudo commands but still I can't access /var/www/signature/ through the browser:

Any idea what could go wrong?

It did not work for me. Please help

Have another answer? Share your knowledge.