Skip to content

Instantly share code, notes, and snippets.

@ikrauchanka
Created April 15, 2019 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ikrauchanka/cd5485a56f4b615ab01355112945d550 to your computer and use it in GitHub Desktop.
Save ikrauchanka/cd5485a56f4b615ab01355112945d550 to your computer and use it in GitHub Desktop.
# . THANKS Gary Phillip
<VirtualHost *:80>
ServerName jenkins-ci.mydomain.org
ServerAdmin admin@mydomain.vm
Redirect / https://jenkins-ci.mydomain.org/
</VirtualHost>
<Virtualhost *:443>
ServerName jenkins-ci.mydomain.org
ServerAdmin admin@mydomain.vm
LogLevel info
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
ErrorLog /var/log/jenkins-httpd-error.log
CustomLog /var/log/jenkins-httpd-access.log combined
SSLEngine on
SSLProxyEngine on
# SSL certificate and keys. Edit paths to whereever your SSL files are located
SSLCertificateKeyFile /etc/ssl/private/mydomain_org.key
SSLCertificateFile /etc/ssl/certs/__mydomain_org.crt
SSLCertificateChainFile /etc/ssl/certs/__mydomain_org.ca-bundle
ProxyRequests Off
ProxyPreserveHost On
RewriteEngine On
RequestHeader set X-Forwarded-Proto "https"
AllowEncodedSlashes NoDecode
ProxyPass / http://localhost:8080/ nocanon
ProxyPassReverse / http://localhost:8080/
<Proxy http://localhost:8080/*>
Order deny,allow
Allow from all
</Proxy>
ProxyTimeout 120
</Virtualhost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment