Jan Czarny Jan Czarny - 1 month ago 14
Apache Configuration Question

(Ubuntu Server )Apache 2.4.6 -> client denied by server configuration (PHP FPM) [While load php file]

Today i was updated ubuntu server 13.04 -> 13.10

And my apache2 is broken

Here my config

error.log

[Fri Oct 18 10:48:07.237170 2013] [:notice] [pid 8292:tid 139804677900160] FastCGI: process manager initialized (pid 8292)
[Fri Oct 18 10:48:07.241185 2013] [mpm_event:notice] [pid 8289:tid 139804677900160] AH00489: Apache/2.4.6 (Ubuntu) mod_fastcgi/mod_fastcgi-SNAP-0910052141 configured -- resuming normal operations
[Fri Oct 18 10:48:07.241652 2013] [core:notice] [pid 8289:tid 139804677900160] AH00094: Command line: '/usr/sbin/apache2'
[Fri Oct 18 10:48:28.313923 2013] [authz_core:error] [pid 8294:tid 139804573181696] [client 81.219.59.75:3536] AH01630: client denied by server configuration: /usr/lib/cgi-bin/php5-fcgi


default.conf

#EU
<VirtualHost *:80>
#ServerName
DocumentRoot /var/www/dev_stable

DirectoryIndex index.php index.html index.htm


<Directory /var/www/dev_stable>
Options Indexes FollowSymLinks MultiViews

AllowOverride all
Require all granted


</Directory>

</VirtualHost>


mods-enabled/fastcgi.conf

#<IfModule mod_fastcgi.c>
# AddHandler fastcgi-script .fcgi
# FastCgiWrapper /usr/lib/apache2/suexec
# FastCgiIpcDir /var/lib/apache2/fastcgi
#</IfModule>


<IfModule mod_fastcgi.c>
AddHandler php5-fcgi .php
Action php5-fcgi /php5-fcgi
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
</Ifmodule>


When i try load file via browser i got:

site_name/TEST/

Forbidden

You don't have permission to access /php5-fcgi/TEST/index.php on this server.


what i should fix?

Answer

i have exactly the same issue. i ran a couple of virtual hosts on my local machine for developing. first i changed /etc/apache2/conf-available/php5-fpm.conf. i replaced every:

Order Deny,Allow
Deny from all

to

Require all granted

the conf has to be enabled by a2enconf php5-fpm. i did the same with my virtual hosts configs and made the replacements.

i think this is not adviced for security reasons but as long as i use my server for local purposes only i can live with it.