2023-02-27 18:02:28 +00:00
|
|
|
<IfModule mod_ssl.c>
|
|
|
|
|
|
|
|
<VirtualHost *:443>
|
|
|
|
ServerName git.lunch.org.uk
|
|
|
|
|
|
|
|
ErrorLog /var/log/apache2/git-error.log
|
|
|
|
CustomLog /var/log/apache2/git-access.log combined
|
|
|
|
|
|
|
|
RemoteIPProxyProtocol On
|
|
|
|
|
2023-03-26 16:34:43 +01:00
|
|
|
# Gitea proxy
|
2023-02-27 18:02:28 +00:00
|
|
|
ProxyPass / http://localhost:3000/
|
|
|
|
ProxyPassReverse / http://localhost:3000
|
|
|
|
ProxyRequests Off
|
|
|
|
AllowEncodedSlashes NoDecode
|
|
|
|
|
|
|
|
# Local reverse proxy authorization override
|
|
|
|
# Most unix distribution deny proxy by default
|
|
|
|
<Proxy http://localhost:3000/*>
|
|
|
|
Order deny,allow
|
|
|
|
Allow from all
|
|
|
|
</Proxy>
|
|
|
|
|
|
|
|
SSLEngine on
|
|
|
|
SSLCertificateFile /var/lib/dehydrated/certs/git.lunch.org.uk/fullchain.pem
|
|
|
|
SSLCertificateKeyFile /var/lib/dehydrated/certs/git.lunch.org.uk/privkey.pem
|
|
|
|
</VirtualHost>
|
|
|
|
|
|
|
|
</IfModule>
|
|
|
|
|
|
|
|
<VirtualHost *:80>
|
|
|
|
ServerName git.lunch.org.uk
|
|
|
|
|
|
|
|
ErrorLog /var/log/apache2/git-error.log
|
|
|
|
CustomLog /var/log/apache2/git-access.log combined
|
|
|
|
|
|
|
|
RemoteIPProxyProtocol On
|
|
|
|
|
|
|
|
<IfModule rewrite_module>
|
|
|
|
#
|
|
|
|
# This redirects all accesses to the HTTPS version of the site.
|
|
|
|
#
|
|
|
|
RewriteEngine On
|
|
|
|
|
|
|
|
RewriteRule ^/?(.*) https://git.lunch.org.uk/$1 [R=301,L]
|
|
|
|
</IfModule>
|
|
|
|
</VirtualHost>
|