SYSTEM INFORMATION | |
---|---|
OS type and version: | Ubuntu 18.04 |
Webmin version: | 1.984 |
Virtualmin version: | 6.17-3 |
Related products version: | PHP 7.2 |
Hi all,
I upgraded my server from Ubuntu 16.04 to 18.04 and PHP 7.0 to 7.2 and I have the following problems:
PHP running as FCGI does not work, the php file is not processed and the source is sent to the browser.
PHP running as mod_php works only on https, on http the source file is sent to the browser.
I have reviewd the apache2 configuration files, and spent the last 2 days searching the Internet and nothing that I’ve found has solved the problem.
There are no errors on the apache log files, but there is one strange observation, there are no entries on the apache suexec.log which means that apache is not even trying tu run the php7.2.fcgi under fcgi-bin
Any help would be greatly appreciated.
Here are two virtual sites’ configuration files
PHP on FCGI
<VirtualHost *:80>
SuexecUserGroup “#1001” “#1001”
ServerName chat.zigue.mx
ServerAlias www.chat.zigue.mx
ServerAlias webmail.chat.zigue.mx
ServerAlias admin.chat.zigue.mx
DocumentRoot /home/zigue/domains/chat.zigue.mx/public_html
ErrorLog /var/log/virtualmin/chat.zigue.mx_error_log
CustomLog /var/log/virtualmin/chat.zigue.mx_access_log combined
ScriptAlias /cgi-bin/ /home/zigue/domains/chat.zigue.mx/cgi-bin/
ScriptAlias /awstats/ /home/zigue/domains/chat.zigue.mx/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/zigue/domains/chat.zigue.mx/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php7.2
FCGIWrapper /home/zigue/domains/chat.zigue.mx/fcgi-bin/php7.2.fcgi .php
FCGIWrapper /home/zigue/domains/chat.zigue.mx/fcgi-bin/php7.2.fcgi .php7.2
</Directory>
<Directory /home/zigue/domains/chat.zigue.mx/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.chat.zigue.mx
RewriteRule ^(.*) https://chat.zigue.mx:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.chat.zigue.mx
RewriteRule ^(.*) http://chat.zigue.mx:10000/ [R]
RemoveHandler .php
RemoveHandler .php7.2
php_admin_value engine Off
FcgidMaxRequestLen 1073741824
<Files awstats.pl>
AuthName "app.zigue.mx statistics"
AuthType Basic
AuthUserFile /home/zigue/domains/chat.zigue.mx/.awstats-htpasswd
require valid-user
</Files>
IPCCommTimeout 31
RedirectMatch /(.*)$ https://chat.zigue.mx
<VirtualHost *:443>
SuexecUserGroup “#1001” “#1001”
ServerName chat.zigue.mx
ServerAlias www.chat.zigue.mx
ServerAlias webmail.chat.zigue.mx
ServerAlias admin.chat.zigue.mx
DocumentRoot /home/zigue/domains/chat.zigue.mx/public_html
ErrorLog /var/log/virtualmin/chat.zigue.mx_error_log
CustomLog /var/log/virtualmin/chat.zigue.mx_access_log combined
ScriptAlias /cgi-bin/ /home/zigue/domains/chat.zigue.mx/cgi-bin/
ScriptAlias /awstats/ /home/zigue/domains/chat.zigue.mx/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/zigue/domains/chat.zigue.mx/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php7.2
FCGIWrapper /home/zigue/domains/chat.zigue.mx/fcgi-bin/php7.2.fcgi .php
FCGIWrapper /home/zigue/domains/chat.zigue.mx/fcgi-bin/php7.2.fcgi .php7.2
</Directory>
<Directory /home/zigue/domains/chat.zigue.mx/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.chat.zigue.mx
RewriteRule ^(.*) https://chat.zigue.mx:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.chat.zigue.mx
RewriteRule ^(.*) http://chat.zigue.mx:10000/ [R]
RemoveHandler .php
RemoveHandler .php7.2
php_admin_value engine Off
FcgidMaxRequestLen 1073741824
<Files awstats.pl>
AuthName "app.zigue.mx statistics"
AuthType Basic
AuthUserFile /home/zigue/domains/chat.zigue.mx/.awstats-htpasswd
require valid-user
</Files>
SSLEngine on
SSLCertificateFile /home/zigue/domains/chat.zigue.mx/ssl.cert
SSLCertificateKeyFile /home/zigue/domains/chat.zigue.mx/ssl.key
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLCACertificateFile /home/zigue/domains/chat.zigue.mx/ssl.ca
IPCCommTimeout 31
PHP on mod_php
<VirtualHost *:80>
SuexecUserGroup “#1001” “#1001”
ServerName app.zigue.mx
ServerAlias www.app.zigue.mx
ServerAlias webmail.app.zigue.mx
ServerAlias admin.app.zigue.mx
DocumentRoot /home/zigue/domains/app.zigue.mx/public_html
ErrorLog /var/log/virtualmin/app.zigue.mx_error_log
CustomLog /var/log/virtualmin/app.zigue.mx_access_log combined
ScriptAlias /cgi-bin/ /home/zigue/domains/app.zigue.mx/cgi-bin/
ScriptAlias /awstats/ /home/zigue/domains/app.zigue.mx/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/zigue/domains/app.zigue.mx/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php7.2 .php7.2
AddType application/x-httpd-php .php
</Directory>
<Directory /home/zigue/domains/app.zigue.mx/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.app.zigue.mx
RewriteRule ^(.*) https://app.zigue.mx:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.app.zigue.mx
RewriteRule ^(.*) http://app.zigue.mx:10000/ [R]
<Files awstats.pl>
AuthName "app.zigue.mx statistics"
AuthType Basic
AuthUserFile /home/zigue/domains/app.zigue.mx/.awstats-htpasswd
require valid-user
</Files>
RedirectMatch /(.*)$ https://app.zigue.mx
<VirtualHost *:443>
SuexecUserGroup “#1001” “#1001”
ServerName app.zigue.mx
ServerAlias www.app.zigue.mx
ServerAlias webmail.app.zigue.mx
ServerAlias admin.app.zigue.mx
DocumentRoot /home/zigue/domains/app.zigue.mx/public_html
ErrorLog /var/log/virtualmin/app.zigue.mx_error_log
CustomLog /var/log/virtualmin/app.zigue.mx_access_log combined
ScriptAlias /cgi-bin/ /home/zigue/domains/app.zigue.mx/cgi-bin/
ScriptAlias /awstats/ /home/zigue/domains/app.zigue.mx/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/zigue/domains/app.zigue.mx/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php7.2 .php7.2
AddType application/x-httpd-php .php
</Directory>
<Directory /home/zigue/domains/app.zigue.mx/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.app.zigue.mx
RewriteRule ^(.*) https://app.zigue.mx:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.app.zigue.mx
RewriteRule ^(.*) http://app.zigue.mx:10000/ [R]
<Files awstats.pl>
AuthName "app.zigue.mx statistics"
AuthType Basic
AuthUserFile /home/zigue/domains/app.zigue.mx/.awstats-htpasswd
require valid-user
</Files>
SSLEngine on
SSLCertificateFile /home/zigue/domains/app.zigue.mx/ssl.cert
SSLCertificateKeyFile /home/zigue/domains/app.zigue.mx/ssl.key
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLCACertificateFile /home/zigue/domains/app.zigue.mx/ssl.ca