Php-fpm apache2 error 403 in .css.js files
I am trying to set up an apache2 server on debian jessie with multiple vhosts. I want each of them to have a different FastCgiExternalServer. I am using php version from php5-fpm package on jessie with default config files / etc / php 5 / fpm.
The basic Apache configuration works fine:
<VirtualHost *:80>
ServerName lalala.org
DocumentRoot "/path/to/app/www"
<Directory "/path/to/app/www">
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
Require all granted
</Directory>
FastCgiExternalServer /path/to/app/www -socket /var/run/php5-fpm.sock
AddHandler php-fcgi .php
Action php-fcgi /path/to/app/www
</VirtualHost>
However, I got 403 errors in .css, .js files. I read this article: http://whocares.de/fastcgiexternalserver-demystified/8/ , but even with this configuration:
FastCgiExternalServer /path/to/app/www -socket /var/run/php5-fpm.sock
AddHandler php-fcgi .php
Action php-fcgi /virtualpath
Alias /virtualpath /path/to/app/fcgi-uri
(/ path / to / app / fcgi-uri is a symbolic link to / path / to / app / www)
This does not work. It is as if I have a local problem but cannot figure out what.
thank
EDIT: I found a solution that does fastcgi execution:
<FilesMatch \.php$>
SetHandler "proxy:unix:/path/to/sock/socket.sock|fcgi://localhost"
</FilesMatch>
But I think this is more of a workaround than a solution.
source to share
No one has answered this question yet
See similar questions:
or similar: