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

Posted November 4, 2014 423.9k 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 !

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
11 answers

Open /etc/apache2/apache2.conf

Look for the line that says

<Directory /var/www/html>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted

and change it to

<Directory /var/www>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted

That should fix it.

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 !

First Header Second Header
Content Cell Content Cell
Content Cell Content Cell

Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
Allow from all

Use These Options Inside “Directory Tag”

Worked For Me.

Keep attention.
Apache 2.2
“Allow from all”
Apache 2.4
“Require all granted”

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?

Great.I was wasted many hours but not got any luck. Here I got soln… here only. Thanks Mr. mhktricks

This digitalocean helping me alog. great work

It did not work for me. Please help

  • Your problem may be connected with file access permissions in your file system (Ubuntu in my case), and Apache has nothing to do with that.

    Check that the DocumentRoot directory used for your site has “read” permission for all users. To do it, in a terminal, go to the parent directory containing your DocumentRoot directory and run the command “ls -l”.

    If you get something like “drwxr-x—” in the line in front of the name of your DocumentRoot directory, then give reading rights to all users running the command “sudo chmod a+r nameOfYourDocumentRootDirectory”. Run again “ls -l” and check that the permission actually changed to something like this “drwxr-xr–”.

    Go and check if this solved the problem.

Previous 1 2 Next