Почему Apache печатает содержимое моих файлов PHP вместо передачи их в PHP-FPM?

У меня есть следующий файл конфигурации под sites-enabled . Я использую mod_proxy_fcgi .

 ServerName local.dev  AllowOverride all Require all granted   # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. ServerAlias *.local.*.com SetEnv CURRENT_ENVIRONMENT ENV_DOCKER ServerAdmin webmaster@localhost VirtualDocumentRoot /var/www/local/%3/trunk/%3+-%1/site/www ProxyPassMatch "^/var/www/local/(.*/trunk/.*/site/www/.*\.php.*)$" "fcgi://php:9000/var/www/local/$1" # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, eg LogLevel debug ErrorLog /var/log/apache2/error.log CustomLog /var/log/apache2/access.log combined   # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redirection URLs. In the context of virtual hosts, the ServerName # specifies what hostname must appear in the request's Host: header to # match this virtual host. For the default virtual host (this file) this # value is not decisive as it is used as a last resort host regardless. # However, you must set it for any further virtual host explicitly. ServerAlias local.*.com SetEnv CURRENT_ENVIRONMENT ENV_DOCKER ServerAdmin webmaster@localhost VirtualDocumentRoot /var/www/local/%2/trunk/%2+/site/www ProxyPassMatch "^/var/www/local/(.*/trunk/.*/site/www/.*\.php.*)$" "fcgi://php:9000/var/www/local/$1" # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit, alert, emerg. # It is also possible to configure the loglevel for particular # modules, eg LogLevel debug ErrorLog /var/log/apache2/error.log CustomLog /var/log/apache2/access.log combined  # vim: syntax=apache ts=4 sw=4 sts=4 sr noet 

Оказалось, что мне просто нужна директива SetHandler в моей конфигурации Apache.

  SetHandler "proxy:fcgi://php:9000"