Skip to content

Instantly share code, notes, and snippets.

@phoexer
Created February 16, 2020 20:17
Show Gist options
  • Save phoexer/f166fe2c29cadbe4d1fc2b3d46f24577 to your computer and use it in GitHub Desktop.
Save phoexer/f166fe2c29cadbe4d1fc2b3d46f24577 to your computer and use it in GitHub Desktop.
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin admin@example.com
ServerName jenkins.example.com
ProxyRequests off
DocumentRoot /var/www/jenkins.example.com/public_html
SSLProxyEngine on
SSLEngine on
ProxyPreserveHost On
ErrorLog /var/www/jenkins.example.com/log/error.log
CustomLog /var/www/jenkins.example.com/log/access.log combined
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel error
ProxyPass / http://127.0.0.1:8080/ nocanon
ProxyPassReverse / http://127.0.0.1:8080/
AllowEncodedSlashes NoDecode
RequestHeader set X-Forwarded-Proto "https"
<Proxy http://localhost:8080/*>
Order deny,allow
Allow from all
</Proxy>
SSLCertificateFile /etc/letsencrypt/live/jenkins.example.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/jenkins.example.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment