Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # set ssl on nginx reverse proxy
- # https://www.digitalocean.com/community/tutorials/how-to-configure-nginx-with-ssl-as-a-reverse-proxy-for-jenkins
- upstream dockerapp {
- server 127.0.0.1:8080;
- keepalive 64;
- }
- server {
- listen 80;
- listen 443 ssl;
- server_name subdomain.domain.com;
- error_log /var/log/nginx/error.log info;
- ssl_certificate /etc/nginx/cert.crt;
- ssl_certificate_key /etc/nginx/cert.key;
- ssl on;
- ssl_session_cache builtin:1000 shared:SSL:10m;
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4;
- ssl_prefer_server_ciphers on;
- location / {
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header Host $host;
- #proxy_set_header X-Forwarded-Proto $scheme;
- #proxy_set_header X-Forwarded-Host $host;
- #proxy_set_header X-Forwarded-Port $server_port;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- # proxy_set_header Connection "upgrade";
- proxy_set_header Connection $http_connection;
- proxy_pass http://dockerapp/;
- # proxy_pass http://localhost:8080;
- proxy_redirect off;
- proxy_read_timeout 240s;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement