Hi, after doing fix from https://www.virtualmin.com/node/40820 it fixed php execution on http:// but if I go to https:// its still being downloaded, any ideas please.
Using letsencrypt certs.
"There is still problem for me with this.
I commented out in /etc/apache2/sites-enabled/my.domain.com.conf
#FcgidMaxRequestLen 1073741824
#php_admin_value engine Off
It worked for http://domain.com/roundcube php executed
but if I go https://domain.com/roundcube php being downloaded not executed
What else to edit please?
cheers"
php7.conf
<FilesMatch ".+\.ph(p[3457]?|t|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch ".+\.phps$">
SetHandler application/x-httpd-php-source
# Deny access to raw php sources by default
# To re-enable it's recommended to enable access to the files
# only in specific virtual host or directory
Require all denied
</FilesMatch>
# Deny access to files without filename (e.g. '.php')
<FilesMatch "^\.ph(p[3457]?|t|tml|ps)$">
Require all denied
</FilesMatch>
# Running PHP scripts in user directories is disabled by default
#
# To re-enable PHP in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
#<IfModule mod_userdir.c>
# <Directory /home/*/public_html>
# php_admin_flag engine Off
# </Directory>
#</IfModule>
mysite.com.conf
<VirtualHost *:80>
SuexecUserGroup "#1001" "#1001"
ServerName vodeoo.com
ServerAlias www.vodeoo.com
DocumentRoot /home/vodeoo/public_html
ErrorLog /var/log/virtualmin/vodeoo.com_error_log
CustomLog /var/log/virtualmin/vodeoo.com_access_log combined
ScriptAlias /cgi-bin/ /home/vodeoo/cgi-bin/
ScriptAlias /awstats/ /home/vodeoo/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/vodeoo/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 .php5.6
AddHandler fcgid-script .php7.0
FCGIWrapper /home/vodeoo/fcgi-bin/php7.0.fcgi .php
FCGIWrapper /home/vodeoo/fcgi-bin/php5.6.fcgi .php5.6
FCGIWrapper /home/vodeoo/fcgi-bin/php7.0.fcgi .php7.0
</Directory>
<Directory /home/vodeoo/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RemoveHandler .php
RemoveHandler .php5.6
RemoveHandler .php7.0
#FcgidMaxRequestLen 1073741824
#php_admin_value engine Off
<Files awstats.pl>
AuthName "vodeoo.com statistics"
AuthType Basic
AuthUserFile /home/vodeoo/.awstats-htpasswd
require valid-user
</Files>
IPCCommTimeout 121
FcgidMaxRequestLen 1073741824
</VirtualHost>
<VirtualHost 64.137.182.80:443>
SuexecUserGroup "#1001" "#1001"
ServerName vodeoo.com
ServerAlias www.vodeoo.com
DocumentRoot /home/vodeoo/public_html
ErrorLog /var/log/virtualmin/vodeoo.com_error_log
CustomLog /var/log/virtualmin/vodeoo.com_access_log combined
ScriptAlias /cgi-bin/ /home/vodeoo/cgi-bin/
ScriptAlias /awstats/ /home/vodeoo/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/vodeoo/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 .php5.6
AddHandler fcgid-script .php7.0
FCGIWrapper /home/vodeoo/fcgi-bin/php7.0.fcgi .php
FCGIWrapper /home/vodeoo/fcgi-bin/php5.6.fcgi .php5.6
FCGIWrapper /home/vodeoo/fcgi-bin/php7.0.fcgi .php7.0
</Directory>
<Directory /home/vodeoo/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RemoveHandler .php
RemoveHandler .php5.6
RemoveHandler .php7.0
FcgidMaxRequestLen 1073741824
php_admin_value engine Off
SSLEngine on
SSLCertificateFile /home/vodeoo/ssl_certificates/cert.pem
SSLCertificateKeyFile /home/vodeoo/ssl_certificates/privkey.pem
<Files awstats.pl>
AuthName "vodeoo.com statistics"
AuthType Basic
AuthUserFile /home/vodeoo/.awstats-htpasswd
require valid-user
</Files>
IPCCommTimeout 121
SSLCACertificateFile /home/vodeoo/ssl_certificates/fullchain.pem
<Directory /home/vodeoo/public_html/phpmyadmin>
Options +Indexes +IncludesNOEXEC +SymLinksifOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
AddHandler fcgid-script .php
FCGIWrapper /home/vodeoo/fcgi-bin/php5.6.fcgi .php
AddHandler fcgid-script .php5.6
FCGIWrapper /home/vodeoo/fcgi-bin/php5.6.fcgi .php5.6
AddHandler fcgid-script .php7.0
FCGIWrapper /home/vodeoo/fcgi-bin/php7.0.fcgi .php7.0
AddType application/x-httpd-php .php
</Directory>
</VirtualHost>
okay i sorted it
had to comment out
#FcgidMaxRequestLen 1073741824
#php_admin_value engine Off
SSLEngine on
how to ajust it globally for new domains ?
i see php_admin_value engine Off in /etc/apache2/mods-enabled/php7.0.conf and commented out.
but i dont see FcgidMaxRequestLen 1073741824 in /etc/apache2/mods-enabled/fcgid.conf
<IfModule mod_fcgid.c>
FcgidConnectTimeout 20
<IfModule mod_mime.c>
AddHandler fcgid-script .fcgi
</IfModule>
</IfModule>
I have exactly the same problem. It's infuriating.