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

48 lines
1.3 KiB
Plaintext
Raw Normal View History

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