Page 1 of 1

[SOLVED]You don't have permission to access / on this server

Posted: Tue Jul 15, 2014 9:03 pm
by openyk
Hi guys, I think I must be missing something very simple when softlinking my project to the web folder because I get that permission error when accessing the server at its IP address. I'm running Ubuntu 14.04 x64 on a digitalocean instance.

Code: Select all

# SSH to server. As root user:
# (Install VestaCP, clone the project repo)

# Delete the existing files in web folder
rm /home/admin/web/default.domain/public_html/*

# Softlink the project to web folder
ln -s /home/admin/web/default.domain/project_folder/upload_folder /home/admin/web/default.domain/public_html/

# Change project ownership for apache server
chown -R admin.www-data /home/admin/web/default.domain/project_folder/
Then I browse to the server's ip address on mozilla, and it should work but it isn't. Funny thing is I had it working before I think but didn't record the steps that time. :P

Help appreciated!

Solution: It turns out I had messed up by trying to take a shortcut. Instead of writing the full

Code: Select all

# Softlink the project to web folder
ln -s /home/admin/web/default.domain/project_folder/upload_folder /home/admin/web/default.domain/public_html/
I had instead navigated to the default.domain folder and did ln -s projectfolder/uploadfolder public_html/ which did NOT work.

So the CORRECT way is to symlink the absolute paths for the upload folder and web folder, just as displayed in the first code block above

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

Posted: Tue Jul 15, 2014 11:11 pm
by imperio
Hi,
i think this problem with that

Code: Select all

Change project ownership for apache server
chown -R admin.www-data /home/admin/web/default.domain/project_folder/