I had just made a brand new installation of both Ubuntu trusty and vivid and Debian jessie (tried all of them) on my android phone with Linux Deplow, and installed the LAMP stack via SSH. I wanted Apache to serve files decrypted from an EncFS mount, so I found easier to move the DocumentRoot to a subfolder of my home (by editing
/etc/apache2/sites-available/000-default.conf – by the way, this file has changed location quite a bit in the past, being called just
default.conf, or being
httpd.conf in older versions), and changed Apache’s username to my own (by editing
Well, what happened is that, no matter what I did, I was still getting a 403 Permission denied error, which had nothing to do with EncFS.
By pure chance, I went checking what was inside
/etc/apache2/apache2.conf, and other than a reference to envvars for the username and group definitions for the user Apache is run as, scrolling further down there are folders definitions which were, in previous versions, located in the
default.conf file. Changing in there the reference to
/var/www into the new custom folder made it.
You obviously need to restart Apache after such changes.