File: //etc/apache2/sites-enabled/drfabregues.com.conf
<VirtualHost *:80>
SuexecUserGroup #1210 #1204
ServerName drfabregues.com
ServerAlias www.drfabregues.com
ServerAlias *.drfabregues.com
DocumentRoot /home/drfabregues.com/public_html
ErrorLog /home/drfabregues.com/logs/error_log
CustomLog /home/drfabregues.com/logs/access_log combined
ScriptAlias /cgi-bin/ /home/drfabregues.com/cgi-bin/
ScriptAlias /awstats/ /home/drfabregues.com/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/drfabregues.com/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/drfabregues.com/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
RemoveHandler .php7.2
RemoveHandler .php7.3
RemoveHandler .php7.4
RemoveHandler .php8.0
<Files awstats.pl>
AuthName "drfabregues.com statistics"
AuthType Basic
AuthUserFile /home/drfabregues.com/.awstats-htpasswd
require valid-user
</Files>
RedirectMatch ^/(?!.well-known)(.*)$ https://drfabregues.com/$1
<FilesMatch \.php$>
SetHandler proxy:unix:/var/php-fpm/159708035615009.sock|fcgi://127.0.0.1
</FilesMatch>
</VirtualHost>
<VirtualHost *:443>
SuexecUserGroup #1210 #1204
ServerName drfabregues.com
ServerAlias www.drfabregues.com
ServerAlias *.drfabregues.com
DocumentRoot /home/drfabregues.com/public_html
ErrorLog /home/drfabregues.com/logs/error_log
CustomLog /home/drfabregues.com/logs/access_log combined
ScriptAlias /cgi-bin/ /home/drfabregues.com/cgi-bin/
ScriptAlias /awstats/ /home/drfabregues.com/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/drfabregues.com/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/drfabregues.com/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
RemoveHandler .php7.2
RemoveHandler .php7.3
RemoveHandler .php7.4
RemoveHandler .php8.0
SSLEngine on
SSLCertificateFile /home/drfabregues.com/ssl.cert
SSLCertificateKeyFile /home/drfabregues.com/ssl.key
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
<Files awstats.pl>
AuthName "drfabregues.com statistics"
AuthType Basic
AuthUserFile /home/drfabregues.com/.awstats-htpasswd
require valid-user
</Files>
SSLCACertificateFile /home/drfabregues.com/ssl.ca
<FilesMatch \.php$>
SetHandler proxy:unix:/var/php-fpm/159708035615009.sock|fcgi://127.0.0.1
</FilesMatch>
</VirtualHost>