user _www; worker_processes 1; #error_log logs/error.log; #error_log logs/error.log notice; error_log logs/error.log info; events { worker_connections 256; } http { include mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log logs/access.log main; server { listen 80; server_name localhost home.uponmyshoulder.com; proxy_read_timeout 2; proxy_connect_timeout 2; # Default redirect to Apache on 8080 location / { proxy_pass http://127.0.0.1:8080/; } # Redirect to Sinatra location /reorg { proxy_pass http://127.0.0.1:9393; } # deny access to .htaccess files, if Apache's document root concurs with nginx's one location ~ /\.ht { deny all; } } }