powerbuoy powerbuoy - 1 year ago 63
Apache Configuration Question

Apache gives 403 forbidden

I recently had to reinstall Ubuntu and everything else as my SSD crashed.

I've got Apache/MySQL/PHP set up and can access localhost/ without problems. Running PHP and MySQL works fine as well.

I keep my projects in a Dropbox folder (since the crash) located at

and have set up VHOSTs that point to some of the projects in there. I've also set up
so that I can access my projects through

However, when I try to visit
all I get is
403 forbidden
. I've run
chmod -R 777 Projects/
and all the files and folders are now green in the terminal. That didn't help.

I checked the error-logs and they say:

[crit] [client] (13)Permission denied: /home/powerbuoy/Dropbox/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

But there isn't even supposed to be a
file anywhere there.

I even set up a completely empty project (
with just
<?php phpinfo()
inside), set up a VHOST and a
URL. I get the same error here.

Any ideas?


Edit: I tried moving my test project to the desktop (
) and now it works :P

Perhaps it has something to do with the projects being located inside the Dropbox folder??

Answer Source

Apparently simply chmoding the directory the project is in wasn't enough. I had to chmod all the directories higher up in the tree as well.

So even though my VHOST pointed to /home/powerbuoy/Dropbox/Projects/AProject/ simply chmoding /AProject/ is not enough but it has to be done all the way from /home/powerbuoy/ it seems.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download