web.conf 867 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. server
  2. {
  3. listen 82;
  4. listen [::]:82;
  5. server_name xxx;
  6. return 301 https://$http_host$request_uri;
  7. access_log /dev/null;
  8. error_log /dev/null;
  9. }
  10. server
  11. {
  12. listen 127.0.0.1:60000 proxy_protocol;
  13. listen 127.0.0.1:60001 http2 proxy_protocol;
  14. server_name xxx;
  15. index index.html index.htm index.php default.php default.htm default.html;
  16. root /var/www/html;
  17. add_header Strict-Transport-Security "max-age=63072000" always;
  18. location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  19. {
  20. expires 30d;
  21. error_log off;
  22. }
  23. location ~ .*\.(js|css)?$
  24. {
  25. expires 12h;
  26. error_log off;
  27. }
  28. }
  29. server {
  30. listen 82;
  31. server_name x.x.x.x;
  32. return 301 https://xxx$request_uri;
  33. }