Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 443;
- ssl on;
- location @404 {
- return 302 /app-path-to-404;
- }
- error_page 404 = @404;
- # All your server and TLS/certificate settings are up here somewhere
- ssl_certificate /etc/nginx/ssl/yourcert.pem;
- ssl_certificate_key /etc/nginx/ssl/yourcert.key;
- location ^~ /jenkins/ {
- # Convert inbound server requests for https://domain.tld/jenkins/ to
- # local network requests for http://yourdomain.tld:8080/jenkins/
- proxy_pass http://yourdomain.tld:8080/jenkins/;
- # Rewrite HTTPS requests from WAN to HTTP requests on LAN
- proxy_redirect http:// https://;
- # Proxy intercept errors
- proxy_intercept_errors on;
- # The following settings from https://wiki.jenkins-ci.org/display/JENKINS/Running+Hudson+behind+Nginx
- sendfile off;
- proxy_set_header Host $host:$server_port;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_max_temp_file_size 0;
- #this is the maximum upload size
- client_max_body_size 10m;
- client_body_buffer_size 128k;
- proxy_connect_timeout 90;
- proxy_send_timeout 90;
- proxy_read_timeout 90;
- proxy_temp_file_write_size 64k;
- # Required for new HTTP-based CLI
- proxy_http_version 1.1;
- proxy_request_buffering off;
- proxy_buffering off; # Required for HTTP-based CLI to work over SSL
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement