File: //etc/apache2/sites-enabled/nakedtenant.co.uk.conf
<VirtualHost *:80>
ServerName nakedtenant.co.uk
ServerAlias www.nakedtenant.co.uk
DocumentRoot /home/nakedtenant.co.uk/public_html
ErrorLog ${APACHE_LOG_DIR}/nakedtenant.co.uk.error.log
CustomLog ${APACHE_LOG_DIR}/nakedtenant.co.uk.access.log combined
DirectoryIndex index.php index.html
<Directory /home/nakedtenant.co.uk/public_html>
AllowOverride all
Require all granted
</Directory>
<FilesMatch \.php$>
SetHandler "proxy:unix:/run/php/nakedtenantcouk.sock|fcgi://localhost/"
</FilesMatch>
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.nakedtenant.co.uk [OR]
RewriteCond %{SERVER_NAME} =nakedtenant.co.uk
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet