Created
April 11, 2016 18:51
-
-
Save michelp/fa8d08c709804b964052067dfb8a0aec 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
| worker_processes 1; | |
| user nobody nogroup; | |
| pid /tmp/nginx.pid; | |
| error_log /tmp/nginx.error.log; | |
| events { | |
| worker_connections 1024; # increase if you have lots of clients | |
| accept_mutex off; # "on" if nginx worker_processes > 1 | |
| use epoll; # enable for Linux 2.6+ | |
| } | |
| http { | |
| include mime.types; | |
| default_type application/octet-stream; | |
| access_log /tmp/nginx.access.log combined; | |
| sendfile on; | |
| tcp_nopush on; # off may be better for *some* Comet/long-poll stuff | |
| tcp_nodelay off; # on may be better for some Comet/long-poll stuff | |
| gzip on; | |
| gzip_http_version 1.0; | |
| gzip_proxied any; | |
| gzip_min_length 500; | |
| gzip_disable "MSIE [1-6]\."; | |
| gzip_types text/plain text/html text/xml text/css | |
| text/comma-separated-values | |
| text/javascript application/x-javascript | |
| application/json | |
| application/atom+xml; | |
| proxy_cache_path /var/www/cache levels=1:2 keys_zone=imgcache:10m max_size=1000m inactive=720m; | |
| proxy_temp_path /var/www/cache/tmp; | |
| server { | |
| listen 80 deferred; # for Linux | |
| server_name unelectem.com www.unelectem.com; | |
| location = / { | |
| proxy_set_header Host $host; | |
| proxy_pass http://localhost:4000/ui/index.html; | |
| } | |
| location /thumb { | |
| proxy_pass http://localhost:4000; | |
| proxy_cache imgcache; | |
| proxy_cache_valid 200 302 60m; | |
| proxy_cache_valid 404 10m; | |
| add_header X-Proxy-Cache $upstream_cache_status; | |
| } | |
| location / { | |
| proxy_set_header Host $host; | |
| proxy_pass http://localhost:4000; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment