I followed these instructions (somewhat) on configuring two instances of Apache -- we have internal apps and third party programs (WordPress, etc) running on same VM so for security and performance reasons I opted for this setup instead of Virtual hosts...

Anyway, I have added a user/group called www-apps to compliment www-data

but unless I set the group/owner of /var/www to www-apps I am getting a "403 Forbidden" error when I access the web site/apps.

Based on the googling i've done it sounds as though Apache needs the base directory to be www-apps (or www-data) but in my case I have to distinct directories under /var/www (ie: applications and websites) each should be owned by www-data and www-apps respectively.

I have done this and I still get a forbidden error. I have disabled all the default apache configurations but I assume that the Apache binary is defaulted to /var/www or something...each Apache instance (ie: apache2 and apaches2-apps) need to bind to the specific directories I just mentioned.

Any ideas? This is a common problem and is certainly a permission issue (as I said above can be solved by making /var/www either www-data or www-apps).

EDIT | I override/provide the docroot via a virtual host but even if I set all directories to owned/group www-apps including and under that -- I still receive the error.

1 Answer 1


It seems this simple fix solved the problem:


I am not sure I understand why or how though?

  • I'm surprised that it is not a port conflict.
    – mdpc
    Feb 22, 2015 at 2:37
  • Why is that? The default installation of Apache (apache2) is entirely disabled (a2dissite 000-default). I created a second (apache2-apps) and disabled 000-default there as well. I enabled a virtualHost binding to port 8088. It works fine...the confusing bit for me...is why the /var/www needs RX permissions...I am certain I have done installs before where /var/www sub-directories are what have had RX permissions and it worked fine... Feb 22, 2015 at 2:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.