| 123456789101112131415161718192021222324 |
- server {
- listen 80;
- server_name <domain>;
-
- return 301 https://$server_name$request_uri;
- }
-
-
- server {
- listen 443 ssl;
- server_name <domain>;
-
- ssl_certificate "<certificate file path>";
- ssl_certificate_key "<private key file path>";
-
- location / {
- proxy_redirect off;
- proxy_pass_header Server;
- proxy_set_header Host $http_host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Scheme $scheme;
- proxy_pass http://localhost:<port>/;
- }
- }
|