test.com.conf 537 B

1234567891011121314151617181920212223
  1. server {
  2. ssl on;
  3. listen 171.221.7.50:443;
  4. server_name test.com;
  5. ssl_certificate ../ssl/hixz.org.crt;
  6. ssl_certificate_key ../ssl/hixz.org.key;
  7. location / {
  8. proxy_pass http://127.0.0.1:80;
  9. proxy_redirect off;
  10. proxy_set_header X-Real-IP $remote_addr;
  11. proxy_set_header Host $host;
  12. proxy_http_version 1.1;
  13. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  14. proxy_set_header From-Https on;
  15. }
  16. }
  17. server
  18. {
  19. listen 80;
  20. server_name test.com;
  21. rewrite ^(.*) https://test.com$1 permanent;
  22. }