File: //etc/apache2/sites-enabled/galvan.es.conf
<VirtualHost *:80>
SuexecUserGroup "#1206" "#1200"
ServerName galvan.es
ServerAlias www.galvan.es
ServerAlias webmail.galvan.es
ServerAlias *.galvan.es
DocumentRoot /home/galvan.es/public_html
ErrorLog /home/galvan.es/logs/error_log
CustomLog /home/galvan.es/logs/access_log combined
ScriptAlias /cgi-bin/ /home/galvan.es/cgi-bin/
ScriptAlias /awstats/ /home/galvan.es/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/galvan.es/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
<Directory /home/galvan.es/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.galvan.es
RewriteRule ^(.*) http://galvan.es:2096 [R]
<Files awstats.pl>
AuthName "galvan.es statistics"
AuthType Basic
AuthUserFile /home/galvan.es/.awstats-htpasswd
require valid-user
</Files>
RedirectMatch 301 ^/(?!.well-known)(.*)$ "https://galvan.es/$1"
RemoveHandler .php
RemoveHandler .php5.6
RemoveHandler .php7.0
RemoveHandler .php7.2
RemoveHandler .php7.3
RemoveHandler .php7.4
RemoveHandler .php8.0
RemoveHandler .php8.2
RemoveHandler .php8.3
<FilesMatch \.php$>
SetHandler proxy:unix:/var/php-fpm/149260252322272.sock|fcgi://127.0.0.1
</FilesMatch>
</VirtualHost>
<VirtualHost *:443>
SuexecUserGroup "#1206" "#1200"
ServerName galvan.es
ServerAlias www.galvan.es
ServerAlias webmail.galvan.es
ServerAlias *.galvan.es
DocumentRoot /home/galvan.es/public_html
ErrorLog /home/galvan.es/logs/error_log
CustomLog /home/galvan.es/logs/access_log combined
ScriptAlias /cgi-bin/ /home/galvan.es/cgi-bin/
ScriptAlias /awstats/ /home/galvan.es/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/galvan.es/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
<Directory /home/galvan.es/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.galvan.es
RewriteRule ^(.*) http://galvan.es:2096 [R]
<Files awstats.pl>
AuthName "galvan.es statistics"
AuthType Basic
AuthUserFile /home/galvan.es/.awstats-htpasswd
require valid-user
</Files>
SSLEngine on
SSLCertificateFile /home/galvan.es/ssl.cert
SSLCertificateKeyFile /home/galvan.es/ssl.key
SSLCACertificateFile /home/galvan.es/ssl.ca
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
RemoveHandler .php
RemoveHandler .php5.6
RemoveHandler .php7.0
RemoveHandler .php7.2
RemoveHandler .php7.3
RemoveHandler .php7.4
RemoveHandler .php8.0
RemoveHandler .php8.2
RemoveHandler .php8.3
<FilesMatch \.php$>
SetHandler proxy:unix:/var/php-fpm/149260252322272.sock|fcgi://127.0.0.1
</FilesMatch>
</VirtualHost>