MythicSalt/states/mercurial/hg.lunch.org.uk.conf

44 lines
1.1 KiB
Plaintext
Raw Normal View History

2023-02-24 11:51:59 +00:00
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName hg.lunch.org.uk
ErrorLog /var/log/apache2/hg-error.log
CustomLog /var/log/apache2/hg-access.log combined
RemoteIPProxyProtocol On
ScriptAliasMatch (.*) /srv/mercurial/hgweb.cgi/$1
<Directory /srv/mercurial/>
Options +ExecCGI +FollowSymLinks
AllowOverride Limit
Order allow,deny
Allow from all
Require all granted
</Directory>
SSLEngine on
SSLCertificateFile /var/lib/dehydrated/certs/hg.lunch.org.uk/fullchain.pem
SSLCertificateKeyFile /var/lib/dehydrated/certs/hg.lunch.org.uk/privkey.pem
</VirtualHost>
</IfModule>
<VirtualHost *:80>
ServerName hg.lunch.org.uk
ErrorLog /var/log/apache2/hg-error.log
CustomLog /var/log/apache2/hg-access.log combined
RemoteIPProxyProtocol On
<IfModule rewrite_module>
#
# This redirects all accesses to the HTTPS version of the site.
#
RewriteEngine On
RewriteRule ^/?(.*) https://hg.lunch.org.uk/$1 [R=301,L]
</IfModule>
</VirtualHost>