nginx.conf.tmpl (733B)
1 server { 2 listen {{ env "NOMAD_PORT_http" }}; 3 4 location / { 5 proxy_set_header X-Real-IP $remote_addr; 6 proxy_set_header Host {{ with nomadVar "nomad/jobs/0x0" }}{{ .host }}{{ end }}; 7 proxy_pass http://{{ env "NOMAD_ADDR_fhost" }}; 8 } 9 } 10 11 server { 12 listen {{ env "NOMAD_PORT_https" }} ssl; 13 14 ssl_certificate /etc/letsencrypt/live/0x0.in0rdr.ch/fullchain.pem; 15 ssl_certificate_key /etc/letsencrypt/live/0x0.in0rdr.ch/privkey.pem; 16 17 location / { 18 proxy_set_header X-Real-IP $remote_addr; 19 proxy_set_header Host {{ with nomadVar "nomad/jobs/0x0" }}{{ .host }}{{ end }}; 20 proxy_pass http://{{ env "NOMAD_ADDR_fhost" }}; 21 } 22 }