Created
December 6, 2019 03:59
-
-
Save haixinsong/067fe50fdc273a9fe522afa4268897c2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| user nginx; | |
| worker_processes auto; | |
| error_log /var/log/nginx/error.log warn; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| include /etc/nginx/mime.types; | |
| default_type application/octet-stream; | |
| log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | |
| '$status $body_bytes_sent "$http_referer" ' | |
| '"$http_user_agent" "$http_x_forwarded_for"'; | |
| access_log /var/log/nginx/access.log main; | |
| #disable emitting nginx version | |
| server_tokens off; | |
| sendfile on; | |
| #tcp_nopush on; | |
| keepalive_timeout 65; | |
| gzip on; | |
| gzip_types | |
| text/css | |
| text/xml | |
| text/plain | |
| text/javascript | |
| application/json | |
| application/javascript | |
| application/x-javascript | |
| application/xml | |
| application/xml+rss | |
| application/x-httpd-php | |
| application/xhtml+xml | |
| application/x-font-ttf | |
| application/x-font-opentype | |
| application/vnd.ms-fontobject | |
| image/jpeg | |
| image/gif | |
| image/png | |
| image/svg+xml | |
| image/x-icon | |
| font/ttf | |
| font/otf; | |
| gzip_min_length 1k; | |
| gzip_comp_level 1; | |
| gzip_vary on; | |
| gzip_disable "MSIE [1-6]\."; | |
| include /etc/nginx/conf.d/*.conf; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment