Question

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

  • Posted November 4, 2014

I previously had this error : https://www.digitalocean.com/community/questions/posts-not-found-on-server After following one of the answers I getting this error on accessing my website

Forbidden

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

Apache/2.4.7 (Ubuntu) Server at 128.199.62.70 Port 80

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

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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

Open /etc/apache2/apache2.conf

Look for the line that says

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

and change it to

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

That should fix it.

Open /etc/apache2/apache2.conf

Look for the line that says

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

and change it to

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

That should fix it.

Open /etc/apache2/apache2.conf

Look for the line that says

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

and change it to

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

That should fix it.

Open /etc/apache2/apache2.conf

Look for the line that says

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

and change it to

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

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
    </Directory>
    . . .

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

Thanks !

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

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

Use These Options Inside “Directory Tag”

Worked For Me.

could not help