nginx.conf.tmpl (1093B)
1 # https://github.com/huashengdun/webssh/blob/master/README.md#deployment 2 server { 3 listen {{ env "NOMAD_PORT_https" }} ssl; 4 5 ssl_certificate /etc/letsencrypt/live/ssh.in0rdr.ch/fullchain.pem; 6 ssl_certificate_key /etc/letsencrypt/live/ssh.in0rdr.ch/privkey.pem; 7 8 location / { 9 proxy_pass http://{{ env "NOMAD_ADDR_http" }}; 10 proxy_set_header Host $host; 11 proxy_set_header X-Real-IP $remote_addr; 12 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 13 proxy_set_header X-Forwarded-Proto $scheme; 14 } 15 16 location /ws { 17 proxy_pass http://{{ env "NOMAD_ADDR_http" }}; 18 proxy_set_header Host $host; 19 proxy_set_header X-Real-IP $remote_addr; 20 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 21 proxy_set_header X-Forwarded-Proto $scheme; 22 23 # WebSocket proxying 24 # https://nginx.org/en/docs/http/websocket.html 25 proxy_http_version 1.1; 26 proxy_set_header Upgrade $http_upgrade; 27 proxy_set_header Connection "upgrade"; 28 } 29 }