user www-data; worker_processes auto; pid /run/nginx.pid; include /etc/nginx/modules-enabled/*.conf; events { worker_connections 768; multi_accept on; use epoll; } http { error_log /var/log/nginx/error_log; proxy_cache_path /var/cache/nginx/backend_cache levels=1:2 max_size=64g inactive=60m use_temp_path=off keys_zone=backend_cache:10m; # proxy_cache_path /var/cache/nginx/tiles_cache # levels=1:2 # max_size=64g # use_temp_path=off # keys_zone=tiles_cache:10m; ## # Basic Settings ## sendfile on; tcp_nopush on; types_hash_max_size 2048; # server_tokens off; # server_names_hash_bucket_size 64; # server_name_in_redirect off; include /etc/nginx/mime.types; default_type application/octet-stream; ## # SSL Settings ## ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE ssl_prefer_server_ciphers on; ## # Logging Settings ## access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; ## # Gzip Settings ## gzip on; # gzip_vary on; # gzip_proxied any; # gzip_comp_level 6; # gzip_buffers 16 8k; # gzip_http_version 1.1; # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript; ## # Virtual Host Configs ## include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; server { listen 3141; listen [::]:3141; # location / { # root /usr/share/nginx/html; # try_files $uri /index.html; # proxy_pass http://localhost:3000/$uri; #} location ~ /(?.*) { proxy_set_header Host $host; proxy_set_header X-Forwarded-Proto "https"; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Rewrite-URL $uri; proxy_redirect off; proxy_connect_timeout 5m; proxy_send_timeout 5m; proxy_read_timeout 5m; send_timeout 5m; proxy_cache backend_cache; proxy_cache_lock on; proxy_cache_revalidate on; proxy_cache_valid 200 204 302 1d; proxy_cache_valid 404 1s; proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504; add_header X-Cache-Status $upstream_cache_status; #Change this port to whatever port martin is on proxy_pass http://127.0.0.1:3000/$fwd_path$is_args$args; } } }