daemon off; # One process for each CPU-Core worker_processes 1; # Event handler. events { worker_connections 8096; multi_accept on; use epoll; } http { # # The path we'll cache to. # proxy_cache_path /tmp/cache levels=1:2 keys_zone=cache:30m max_size=1G; # Basic reverse proxy server upstream backend { server 127.0.0.1:4433; } # *:8888 -> 127.0.0.1:4433 server { listen 8888; server_name example.com; ## send all traffic to the back-end location / { proxy_pass http://backend; proxy_redirect off; proxy_set_header X-Forwarded-For $remote_addr; location ~* \.(html|css|jpg|gif|ico|js)$ { proxy_cache cache; proxy_cache_key $host$uri$is_args$args; proxy_cache_valid 200 10m; expires 10m; proxy_pass http://backend; } } } }