web.conf 762 B

1234567891011121314151617181920212223242526272829303132
  1. server
  2. {
  3. listen 80;
  4. listen [::]:80;
  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. }