I have been fighting an apache server for 2 days, trying to figure out why this thing keeps denying access to the server. Check out the settings:

DocumentRoot "/var/www/phreebooks"
ServerName billing.website.com (omitted for security)
<Directory "/var/www/phreebooks">
allow from all 
Options +Indexes

File permissions throughout the entire subdirectory, assigned with chown -R www-data:www-data phreebooks:

drwxr-xr-x 8 www-data www-data     4096 2013-11-26 21:11 phreebooks
drwxr-xr-x  5 www-data www-data 4096 2013-11-26 21:57 install

As soon as I reinstalled the webserver, I got the "it works" index.html.

But when I try to run the install script at billing.webserver.com/install/install.php, I get:

403: You don't have permission to access /install/install.php on this server.

I tried creating a test file, test.php, in the /var/www/phreebooks directory. It allowed me to access the file, but when I move it into any subdirectory, It gives the error, above, access denied.

I have tried completely stripping the apache server out, using apt-get purge [apache packages]. Which everything was removed and then reinstalled. It is having no effect. I've never had this problem with an apache server, before. Please let me know if there are any more details you need...

  • What is in the apache error.log (Mostly: /var/log/apache2/error.log) when you access the test.php in a subdirectory? – rechengehirn Dec 2 '13 at 14:43
  • See petefreitag.com/item/793.cfm for a good check list. In addition, if you are using symbolic links in the path to your html document root, remember to use the FollowSymLinks directive (stackoverflow.com/questions/7381371/…) – user379033 Feb 15 '15 at 14:25

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.