Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- worker_processes 2;
- # Can maybe bump the above to 4, but didn't observe any noticable speed bump in my 1 user setup
- events {
- worker_connections 1024;
- }
- http {
- include mime.types;
- default_type application/octet-stream;
- log_format verb '$remote_addr $host $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" rt=$request_time gr=$gzip_ratio h2="$http2" cache="$upstream_cache_status"';
- access_log /var/log/nginx/access.log verb;
- sendfile on;
- tcp_nopush on;
- keepalive_timeout 65;
- gzip on;
- proxy_cache_path /tmp/dynmapcache levels=1:2 keys_zone=dynmapcache:5m inactive=1h max_size=1g use_temp_path=off;
- proxy_cache_key $scheme$proxy_host$http_host$request_uri;
- proxy_http_version 1.1;
- map $sent_http_content_type $expires {
- default -1;
- ~image/ 10m;
- }
- server {
- listen 80;
- listen [::]:80;
- server_name _;
- location / {
- proxy_cache dynmapcache;
- proxy_set_header Host exalted.asuscomm.com;
- proxy_cache_background_update on;
- #proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
- proxy_connect_timeout 20s;
- # proxy_cache_valid 200 1s;
- proxy_cache_revalidate on;
- proxy_socket_keepalive on;
- proxy_pass http://exalted.asuscomm.com:8123;
- proxy_ignore_headers X-Accel-Expires;
- proxy_ignore_headers Expires;
- proxy_ignore_headers Cache-Control;
- expires $expires;
- }
- location /tiles {
- proxy_cache dynmapcache;
- proxy_set_header Host exalted.asuscomm.com;
- proxy_cache_background_update on;
- proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
- proxy_connect_timeout 20s;
- proxy_cache_valid 200 10m;
- proxy_cache_revalidate on;
- proxy_socket_keepalive on;
- proxy_pass http://exalted.asuscomm.com:8123;
- proxy_ignore_headers X-Accel-Expires;
- proxy_ignore_headers Expires;
- proxy_ignore_headers Cache-Control;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement