![.php 文件显示为源代码](https://linux22.com/image/892603/.php%20%E6%96%87%E4%BB%B6%E6%98%BE%E7%A4%BA%E4%B8%BA%E6%BA%90%E4%BB%A3%E7%A0%81.png)
我已经安装了一个默认的LAMP:
ubuntu 16.04
Apache2
MySQL 5.7
PHP 7.0
默认站点 PHP 正常运行。
000-default.conf
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
但是当我添加虚拟主机时,.php 显示为原始代码:
test.mysite.conf
<VirtualHost *:80>
ServerName test.mysite.com
DocumentRoot "/var/www/test"
<Directory "/var/www/test">
Options Indexes FollowSymlinks MultiViews
AllowOverride All
Require all granted
DirectoryIndex index.php
</Directory>
<FilesMatch "\.php$">
Require all granted
SetHandler proxy:fcgi://127.0.0.1:9000
</FilesMatch>
ErrorLog "/var/log/apache2/test.my_error.log"
ServerSignature Off
CustomLog "/var/log/apache2/test.my_access.log" combined
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
</VirtualHost>
有人能帮忙解决上述错误或其他文件错误吗?
提前致谢