I have a setup with above mentioned. All works fine except for a one problem, for missing .php files I always get a blank page with 'File not found' message(btw with 404 status code). I have ErrorDocument 404 line in my vhost, but looks like it doesn`t take effect in case of FastCGI(for for files not routed into FastCGI it still works). Is there is a way for correct 404 handling in this configuration? Here it is my vhost:
<VirtualHost *:80>
ServerAdmin info@domain.com
ServerName domain.com
ServerAlias www.domain.com
DocumentRoot /var/www/xxx/yyy/
<Directory /var/www/xxx/yyy>
Options FollowSymLinks -MultiViews
AllowOverride FileInfo AuthConfig Limit Options
Order allow,deny
allow from all
</Directory>
FastCgiExternalServer /var/www/xxx/yyy/php.fastcgi -socket /tmp/php-fpm -pass-header Authorization
Action php-fpm-yyy /php.fastcgi virtual
<FilesMatch ".+(php|html)$">
SetHandler php-fpm-yyy
</FilesMatch>
ErrorDocument 404 /map.php
ErrorLog ${APACHE_LOG_DIR}/yyy/error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/yyy/access.log combined
</VirtualHost>