Priyadarshi Kunal
Priyadarshi Kunal

Reputation: 578

Getting Error "You don't have permission to access / on this server. Apache/2.2.22 (Ubuntu) Server at localhost Port 80

I changed my Document above error when trying to access the localhost.

DocumentRoot /home/kunal/Development/sites
<Directory /home/kunal/Development/sites>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
</Directory>

I ran the a2ensite for new file and restarted the apache server. I have my sites folder permission set to 777 permission. Still I am getting this error. Can someone please help me here?

Upvotes: 2

Views: 25517

Answers (2)

micjamking
micjamking

Reputation: 2213

I was having the same issue with sites that I have located in my ~/Dropbox directory. I changed the permissions of the directory by running the following command and everything worked like a charm afterwards.

$ chmod 755 ~/Dropbox

Hope this helps.

Upvotes: 1

Sadaruwan
Sadaruwan

Reputation: 76

I got the same error, my path was similar to yours like this /home/user/Dropbox/WebDev/ServerRoot. I made the same mistake as you by setting permissions on the last folder or your site folder.

Set your permissions at from the 3rd folder of your file path for me I had to set permissions to the /Dropbox folder then it started to work I recommend you set your permissions on the /Development folder and it will start to work.

Hope this helps you.

Upvotes: 6

Related Questions