File: //opt/tle_uk.conf
<VirtualHost *:80>
ServerName www.thelimitededition.co.uk
ServerAlias thelimitededition.co.uk
DocumentRoot /var/sftp/thelimited/
DirectoryIndex index.php index.html
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
ErrorLog /var/logs/tlecouk.www.error.log
CustomLog /var/logs/tlecouk.www.access.log combined
<Directory /var/sftp/thelimited/>
Require all granted
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost *:443>
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
AddType text/html .php
DirectoryIndex index.php
php_value session.save_handler "files"
php_value session.save_path "/var/lib/php/session"
ServerName www.thelimitededition.co.uk
ServerAlias thelimitededition.co.uk
DocumentRoot /var/sftp/thelimited/
DirectoryIndex index.php index.html
ErrorLog /var/logs/tlecouk.www.error.log
CustomLog /var/logs/tlecouk.www.access.log combined
<Directory /var/sftp/thelimited/>
Require all granted
AllowOverride All
</Directory>
SSLEngine on
# A self-signed (snakeoil) certificate can be created by installing
# the ssl-cert package. See
# /usr/share/doc/apache2.2-common/README.Debian.gz for more info.
# If both key and certificate are stored in the same file, only the
# SSLCertificateFile directive is needed.
SSLCertificateFile /etc/letsencrypt/live/www.thelimitededition.co.uk/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.thelimitededition.co.uk/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/www.thelimitededition.co.uk/chain.pem
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory /usr/lib/cgi-bin>
SSLOptions +StdEnvVars
</Directory>
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
# MSIE 7 and newer should be able to use keepalive
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>