nginx-vhost 594 B

1234567891011121314151617181920212223242526
  1. upstream **otp_backend** {
  2. server localhost:**port**;
  3. }
  4. server {
  5. listen 443 ssl;
  6. server_name **host_name**;
  7. index index.html index.htm;
  8. location / {
  9. try_files $uri @backend;
  10. }
  11. location @backend {
  12. proxy_pass http://**otp_backend**;
  13. proxy_http_version 1.1;
  14. proxy_set_header Upgrade $http_upgrade;
  15. proxy_set_header Connection 'upgrade';
  16. proxy_set_header Host $host;
  17. proxy_cache_bypass $http_upgrade;
  18. }
  19. ssl_certificate /etc/letsencrypt/live/**host_name**/fullchain.pem;
  20. ssl_certificate_key /etc/letsencrypt/live/**host_name**/privkey.pem;
  21. }