Last active
July 8, 2020 16:47
-
-
Save changhuixu/7c176e6e7ded24674e81afcb70a2503f 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
| # Run as a less privileged user for security reasons. | |
| user nginx; | |
| # #worker_threads to run; | |
| # "auto" sets it to the #CPU_cores available in the system, and | |
| # offers the best performance. | |
| worker_processes auto; | |
| events { worker_connections 1024; } | |
| http { | |
| server { | |
| # Hide nginx version information. | |
| server_tokens off; | |
| listen 80; | |
| root /usr/share/nginx/html; | |
| include /etc/nginx/mime.types; | |
| location / { | |
| try_files $uri $uri/ /index.html; | |
| } | |
| gzip on; | |
| gzip_vary on; | |
| gzip_http_version 1.0; | |
| gzip_comp_level 5; | |
| gzip_types | |
| application/atom+xml | |
| application/javascript | |
| application/json | |
| application/rss+xml | |
| application/vnd.ms-fontobject | |
| application/x-font-ttf | |
| application/x-web-app-manifest+json | |
| application/xhtml+xml | |
| application/xml | |
| font/opentype | |
| image/svg+xml | |
| image/x-icon | |
| text/css | |
| text/plain | |
| text/x-component; | |
| gzip_proxied no-cache no-store private expired auth; | |
| gzip_min_length 256; | |
| gunzip on; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment