我试图在多个虚拟主机上设置debian jessie上的apache2服务器。 我希望他们每个人都有一个不同的FastCgiExternalServer。 我在jessie上使用php5-fpm包中的php版本,默认是/ etc / php5 / fpmconfiguration文件。
基本的apacheconfiguration工作正常:
<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>
但是,我在.css,.js文件上得到了403个错误。 我读了这篇文章: http : //whocares.de/fastcgiexternalserver-demystified/8/ ,但即使有这样的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是/ path / to / app / www的符号链接)
它不起作用。 就好像我有一个本地的问题,但不知道是什么。
谢谢
编辑:我发现了一个解决scheme,使fastcgi执行工作:
<FilesMatch \.php$> SetHandler "proxy:unix:/path/to/sock/socket.sock|fcgi://localhost" </FilesMatch>
但是我认为这是一个解决scheme而不是解决方法。