Skip to content

Instantly share code, notes, and snippets.

@1206yaya
Last active August 4, 2022 00:00
Show Gist options
  • Save 1206yaya/3b953e7d6df431f306c3255ca43161ef to your computer and use it in GitHub Desktop.
Save 1206yaya/3b953e7d6df431f306c3255ca43161ef to your computer and use it in GitHub Desktop.
jenkins.conf
# curl -o /etc/nginx/conf.d/jenkins.conf https://gist.githubusercontent.com/1206yaya/3b953e7d6df431f306c3255ca43161ef/raw/9053808d295db944f5d102416ad0fe64abc8a90a/gistfile1.txt
upstream jenkins {
server 127.0.0.1:8080;
}
server {
listen 80 default;
server_name sample.jenkins;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
proxy_buffers 16 64k;
proxy_buffer_size 128k;
location / {
proxy_pass http://jenkins;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment