123456789101112131415161718192021222324252627282930313233343536373839 |
- server
- {
- listen 82;
- listen [::]:82;
- server_name xxx;
- return 301 https://$http_host$request_uri;
- access_log /dev/null;
- error_log /dev/null;
- }
- server
- {
- listen 127.0.0.1:60000 proxy_protocol;
- listen 127.0.0.1:60001 http2 proxy_protocol;
- server_name xxx;
- index index.html index.htm index.php default.php default.htm default.html;
- root /var/www/html;
- add_header Strict-Transport-Security "max-age=63072000" always;
- location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
- {
- expires 30d;
- error_log off;
- }
- location ~ .*\.(js|css)?$
- {
- expires 12h;
- error_log off;
- }
- }
- server {
- listen 82;
- server_name x.x.x.x;
- return 301 https://xxx$request_uri;
- }
|