No title Revision d4f21ab7da55 (Thu Mar 10 2011 at 17:14) - Diff Link to this snippet: https://friendpaste.com/2fJYoTEDCJtMKQP90Q13LE Embed: manni perldoc borland colorful default murphy trac fruity autumn bw emacs pastie friendly Show line numbers Wrap lines 1234567891011121314151617181920212223242526272829303132333435363738394041424344454614748495051525354555657585960616263646566676869user www-data;worker_processes 4;pid /var/run/nginx.pid;events { worker_connections 1024;}http { include mime.types; default_type application/octet-stream; server_names_hash_bucket_size 64; # configure log format log_format main '$remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; #main error.log error_log /usr/local/nginx/logs/error.log; sendfile on; tcp_nopush on; #keepalive_timeout 65; tcp_nodelay off; gzip on; gzip_comp_level 2; gzip_proxied any; gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript; upstream mochiweb { server my_server_name:8000; } server { listen 80; server_name my_server_name; location / { root path_to_myapp/myapp/priv/www; index index.html index.htm; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect false; if (-f $request_filename/index.html) { rewrite (.*) $1/index.html break; } if (-f $request_filename.html) { rewrite (.*) $1.html break; } if (!-f $request_filename) { proxy_pass http://mochiweb; break; } } }}