worker_processes 4; error_log logs/error.log; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; log_format ltsv "time:$time_local" "\thost:$remote_addr" "\tforwardedfor:$http_x_forwarded_for" "\treq:$request" "\tstatus:$status" "\tsize:$body_bytes_sent" "\treferer:$http_referer" "\tua:$http_user_agent" "\treqtime:$request_time" "\tcache:$upstream_http_x_cache" "\truntime:$upstream_http_x_runtime" "\tvhost:$host"; access_log logs/access.log ltsv; upstream rack { server unix:/var/webapps/aclog/tmp/sockets/web.sock; } server { listen 80; server_name aclog; location / { root /var/webapps/aclog/frontend/dest; try_files $uri /index.html; } # for developing, pass to webpack-dev-server # location / { # proxy_pass http://localhost:3001; # } location ~ ^/(i/)?api/ { proxy_pass http://rack; } location ~ \.atom$ { proxy_pass http://rack; } } }