MythicSalt/states/gpodder/gpodder.lunch.org.uk.conf

46 lines
1.2 KiB
Plaintext

<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName gpodder.lunch.org.uk
ErrorLog /var/log/apache2/gpodder-error.log
CustomLog /var/log/apache2/gpodder-access.log combined
RemoteIPProxyProtocol On
DocumentRoot /srv/gpodder
<Directory /srv/gpodder>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
Require all granted
DirectoryIndex index.php
</Directory>
SSLEngine on
SSLCertificateFile /var/local/certificates/gpodder.lunch.org.uk/fullchain.pem
SSLCertificateKeyFile /var/local/certificates/gpodder.lunch.org.uk/privkey.pem
</VirtualHost>
</IfModule>
<VirtualHost *:80>
ServerName gpodder.lunch.org.uk
ErrorLog /var/log/apache2/gpodder-error.log
CustomLog /var/log/apache2/gpodder-access.log combined
RemoteIPProxyProtocol On
<IfModule rewrite_module>
#
# This redirects all accesses to the HTTPS version of the site.
#
RewriteEngine On
RewriteRule ^/?(.*) https://gpodder.lunch.org.uk/$1 [R=301,L]
</IfModule>
</VirtualHost>