Writes configuration files for nginx based on running services and certificates
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

nginx.tpl 655B

12345678910111213141516171819
  1. {% for service in services %}
  2. server {
  3. server_name {{ ' '.join(service.vhosts) }};
  4. listen [::]:443{{ ' default_server' if default }} ssl http2;
  5. listen 443{{ ' default_server' if default }} ssl http2;
  6. ssl_certificate {{ service.certificate }};
  7. ssl_trusted_certificate {{ service.trusted_certificate }};
  8. ssl_certificate_key {{ service.certificate_key }};
  9. include /etc/nginx/conf.d/{{ service.vhosts[0] }}/*.conf;
  10. location / {
  11. proxy_pass {{ service.protocol }}://{{ service.host }}:{{ service.port }};
  12. proxy_set_header Host $host;
  13. proxy_set_header X-Forwarded-For $remote_addr;
  14. }
  15. }
  16. {% endfor %}