Last active
August 29, 2015 14:04
-
-
Save pratik60/89835e8a321d463e706f 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
| http { | |
| proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=one:8m max_size=3000m inactive=600m; | |
| proxy_temp_path /var/tmp; | |
| include mime.types; | |
| default_type application/octet-stream; | |
| sendfile on; | |
| keepalive_timeout 65; | |
| gzip on; | |
| gzip_comp_level 6; | |
| gzip_vary on; | |
| gzip_min_length 1000; | |
| gzip_proxied any; | |
| gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; | |
| gzip_buffers 16 8k; | |
| upstream app1.dev { | |
| server localhost:3000; | |
| } | |
| server { | |
| listen 0.0.0.0:80; | |
| server_name app1.dev; | |
| location ~ ^/(images/|img/|javascript/|js/|css/|stylesheets/|flash/|media/|static/|robots.txt|humans.txt|favicon.ico) { | |
| root /webapps/app1/public; | |
| access_log off; | |
| expires max; | |
| } | |
| location / { | |
| proxy_http_version 1.1; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header Host $http_host; | |
| proxy_set_header X-NginX-Proxy true; | |
| proxy_set_header Upgrade $http_upgrade; | |
| proxy_set_header Connection "upgrade"; | |
| proxy_cache one; | |
| proxy_cache_key sfs$request_uri$scheme; | |
| proxy_pass http://app1.dev/; | |
| proxy_redirect off; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment