Created
September 6, 2019 15:00
-
-
Save Nikkely/fa407d6e431f6a3956169d1d1f7cc129 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
user isucon; | |
worker_processes 2; | |
error_log /var/log/nginx/error.log; | |
pid /run/nginx.pid; | |
events { | |
worker_connections 4096; | |
accept_mutex_delay 100ms; | |
} | |
http { | |
upstream isu8 { | |
server 172.24.233.75:8081; | |
# server 47.74.0.78:8081; | |
#DB server | |
#server 47.74.10.92:8081; | |
keepalive 60; | |
} | |
upstream gunicorn { | |
server unix:/tmp/gunicorn.sock; | |
} | |
server_tokens off; | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; | |
log_format ltsv "\tstatus:$status" | |
"time:$time_iso8601" | |
"\treqtime:$request_time" | |
"\tmethod:$request_method" | |
"\turi:$request_uri" | |
"\tprotocol:$server_protocol" | |
"\tua:$http_user_agent" | |
"\tforwardedfor:$http_x_forwarded_for" | |
"\thost:$remote_addr" | |
"\treferer:$http_referer" | |
"\tserver_name:$server_name" | |
"\tvhost:$host" | |
"\tsize:$body_bytes_sent" | |
"\treqsize:$request_length" | |
"\truntime:$upstream_http_x_runtime" | |
"\tapptime:$upstream_response_time" | |
"\tcache:$upstream_http_x_cache"; | |
access_log /var/log/nginx/access.log ltsv; | |
sendfile on; | |
tcp_nopush on; | |
tcp_nodelay on; | |
keepalive_timeout 65; | |
open_file_cache max=100 inactive=20s; | |
proxy_buffering on; | |
proxy_buffer_size 8k; | |
proxy_buffers 100 32k; | |
gzip on; | |
gzip_http_version 1.0; | |
gzip_proxied any; | |
gzip_types text/css | |
text/javascript | |
application/javascript; | |
gzip_static on; | |
server { | |
listen 80; | |
location ~ ^/(js|css|ico)/ { | |
root /home/isucon/torb/webapp/static; | |
expires max; | |
} | |
location / { | |
proxy_http_version 1.1; | |
proxy_set_header Connection ""; | |
proxy_set_header Host $host; | |
proxy_pass http://isu8/; | |
} | |
} | |
server { | |
listen 8081; | |
access_log off; | |
location ~ ^/(js|css|ico)/ { | |
root /home/isucon/torb/webapp/static; | |
expires max; | |
} | |
location / { | |
proxy_set_header Host $host; | |
proxy_pass http://gunicorn/; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment