nginx-ssl.conf 554 B

123456789101112131415161718192021222324
  1. server {
  2. listen 80;
  3. server_name <domain>;
  4. return 301 https://$server_name$request_uri;
  5. }
  6. server {
  7. listen 443 ssl;
  8. server_name <domain>;
  9. ssl_certificate "<certificate file path>";
  10. ssl_certificate_key "<private key file path>";
  11. location / {
  12. proxy_redirect off;
  13. proxy_pass_header Server;
  14. proxy_set_header Host $http_host;
  15. proxy_set_header X-Real-IP $remote_addr;
  16. proxy_set_header X-Scheme $scheme;
  17. proxy_pass http://localhost:<port>/;
  18. }
  19. }