Skip to content

Instantly share code, notes, and snippets.

@cwilby
Forked from freemanirl/ssl-proxy-jenkins.sh
Last active April 28, 2018 22:04
Show Gist options
  • Save cwilby/e69ca3f44364925fdd469a65bd4190df to your computer and use it in GitHub Desktop.
Save cwilby/e69ca3f44364925fdd469a65bd4190df to your computer and use it in GitHub Desktop.
LetsEncrypt Jenkins SSL Proxy Nginx
#!/bin/bash
sudo apt-get install -y epel-release nginx certbot
sudo apt-get install -y certbot
sudo setsebool -P httpd_can_network_connect 1
# install well-known conf in nginx.
systemctl restart nginx.service
certbot certonly -a webroot --webroot-path=/usr/share/nginx/html -d jenkins.cwserve.com
openssl dhparam -out /etc/ssl/certs/dhparam.pem 2048
# install jenkins proxy conf in nginx.
systemctl restart nginx.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment