Last active
November 23, 2017 14:51
-
-
Save zanker/e0ca717bcc9cd11859872c2c73505758 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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