For development purpose, I installed an Apache server on my computer with a set of directories+Alias for each project. This was working until one of the latest update, now it show “Access forbidden! 403”.
The log show the following error on each access:
[Sun May 31 21:50:19.093845 2015] [access_compat:error] [pid 937] [client ::1:47864] AH01797: client denied by server configuration: /home/###########
The installation is very basic:
Standard Apache2 installation
I added in vhosts.d a virtualhost like:
<VirtualHost *:80>
ServerName localhost
</VirtualHost>
Added for each project a file into vhosts.d like: project1.conf
Alias “/project1” “/home/#####”
<Directory “/home/####”>
Options Indexes MultiViews FollowSymlinks
AllowOverride None
Order deny,allow
Deny from all
Allow from localhost,127.0.0.1
</Directory>
Any suggestion of Why it is not working when it was before the update? How to solve this issue?
So…
What I gather from this is that the people at Apache made a bunch of changes in the software, but shipped it with old, now broken config files, and left us with a server that’s broke on install, requiring us to figure out everything that has to be changed piece-by-piece, and to top it off I’ve got a dozen or more broken subsystems besides Apache2 that I’ve been struggling with for several days since I installed 42.2. I need a working computer, not a hobby!
So how about someone providing the Readers-Digest (really short) version of only that which actually needs to be done, without all the lengthy shop talk documents explaining in pedantically tedious detail all the philosophy and describing in gory detail everything other that just simply how to fix it? Please? I’ve been reading files all day and have gotten no closer to understanding what it is that I have to do to stop the “Access forbidden” problem.
Apache on 42.2 works out of the box, however this thread delves into upgrading from an older version of Apache to a newer one which changed the configuration layout (to be precise, it changed the allow/deny configuration parameters and changed them to required xxx granted format).
You can triage the issue by activating an Apache 2 module that supports the old configuration parameters; sudo a2enmod access_compat ; systemctl restart apache2
However you should learn the new way of restricting access and granting it.
Well, I formatted my root partition, and replaced 13.2 with Leap 42.2. Everything is newly installed, including the /etc directory which is in the root partition. The only thing not new is the /srv partition holding the server files. Except for that this is an “out of the box” type install, not just an upgrade. And so the configuration parameters have been changed to the new ‘required xxx granted’ format - and still I getting an "Access forbidden"error.
Was something done differently in the way /srv/www/htdocs/ and it’s children have to have chown and chmod done?
I moved all of /srv/www to my /usr/local partition temporarily, then forced an unconditional update to install the default /srv/www and its tree, to see if a new install would be using different names for owner and group. It isn’t. It also didn’t make any difference, the browser still gets the "access denied"error. As you can see I do have an index.html file, so that’s not the problem either.