Created
May 30, 2017 17:57
-
-
Save akoidan/022c6db352c047b958794925d89e6f5b 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 http http; | |
| #user html; | |
| worker_processes 2; | |
| #error_log logs/error.log; | |
| #error_log logs/error.log notice; | |
| #error_log logs/error.log info; | |
| #pid logs/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| include mime.types; | |
| default_type application/octet-stream; | |
| sendfile on; | |
| #tcp_nopush on; | |
| #keepalive_timeout 0; | |
| keepalive_timeout 65; | |
| gzip on; | |
| access_log /var/log/nginx/access.log; | |
| error_log /var/log/nginx/error.log; | |
| limit_conn_zone $binary_remote_addr zone=connlimit:10m; | |
| # server { | |
| # listen 3000; | |
| # server_name localhost; | |
| # charset utf-8; | |
| # add_header X-Frame-Options SAMEORIGIN; | |
| # root /tmp/dist; | |
| # client_max_body_size 25M; | |
| # location / { | |
| # try_files $uri /index.html; | |
| # add_header Access-Control-Allow-Origin localhost; | |
| # } | |
| # } | |
| server { | |
| listen 5003; | |
| server_name snowhub; | |
| client_max_body_size 25M; | |
| location / { | |
| limit_conn connlimit 10; | |
| limit_rate 1k; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-NginX-Proxy true; | |
| proxy_pass http://localhost:5002/; | |
| proxy_ssl_session_reuse off; | |
| proxy_set_header Host $http_host; | |
| proxy_cache_bypass $http_upgrade; | |
| proxy_redirect off; | |
| } | |
| } | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment