I have installed a default LAMP:
ubuntu 16.04
Apache2
MySQL 5.7
PHP 7.0
The default site PHP is working as expected.
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>
However when I add a virtualhost, .php showed as raw code:
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>
Can anyone help anything wrong above or other files might be wrong?
Tks in advance