Skip to content

Instantly share code, notes, and snippets.

@zanker
Last active November 23, 2017 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save zanker/e0ca717bcc9cd11859872c2c73505758 to your computer and use it in GitHub Desktop.
Save zanker/e0ca717bcc9cd11859872c2c73505758 to your computer and use it in GitHub Desktop.
daemon off;
worker_processes 1;
error_log /dev/stdout debug;
pid /tmp/nginx.pid;
events {
worker_connections 8192;
}
http {
server_tokens off;
server {
listen 8001;
access_log /dev/stdout;
location / {
proxy_pass http://unix:/tmp/puma.socket;
proxy_set_header Host $http_host;
proxy_set_header X-Request-Start "${msec}";
proxy_read_timeout 30s;
proxy_request_buffering on;
}
}
}
app do |env|
sleep 5
[
200,
{"Content-Type" => "text/plain"},
[(Time.now.to_f - env["HTTP_X_REQUEST_START"].to_f).to_s]
]
end
threads 1, 1
environment 'production'
workers 1
preload_app!
bind 'unix:///tmp/puma.socket'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment