# adapted from: # http://unicorn.bogomips.org/examples/nginx.conf daemon off; worker_processes 1; pid tmp/nginx.pid; error_log tmp/nginx.error.log; events { worker_connections 1024; accept_mutex off; use kqueue; } http { include /opt/local/etc/nginx/mime.types; access_log tmp/nginx.access.log; default_type application/octet-stream; sendfile on; tcp_nopush on; tcp_nodelay off; client_body_temp_path /tmp/client_temp; proxy_temp_path /tmp/proxy_temp; fastcgi_temp_path /tmp/fastcgi_temp; scgi_temp_path /tmp/scgi_temp; upstream app_server { server 127.0.0.1:9001 fail_timeout=0; } server { listen 9000 default; server_name _; root test/fixtures/example_application/public; client_max_body_size 4G; location /@spontaneous/js/ { alias application/js/; } location /@spontaneous/static/ { alias application/static/; } location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect off; if (!-f $request_filename) { proxy_pass http://app_server; break; } } error_page 500 502 503 504 /500.html; } }