diff --git a/5f/config/nginx.conf b/5f/config/nginx.conf index f198c8e..f81af87 100644 --- a/5f/config/nginx.conf +++ b/5f/config/nginx.conf @@ -8,12 +8,16 @@ events { http { upstream isu12 { - server isu12a:8080; - server isu12b:8080; - server isu12c:8080; + server isu12a:8081; + server isu12b:8081; + server isu12c:8081; keepalive 8; } + upstream unicorn { + server unix:/tmp/unicorn.sock; + } + log_format ltsv "status:$status" "\ttime:$time_iso8601" "\treqtime:$request_time" @@ -69,4 +73,18 @@ http { proxy_pass http://isu12; } } + + server { + listen 8081; + + location ~ ^/(js|css|fonts)/ { + root /home/isucon/shirokanezoo/5f/webapp/static; + expires max; + } + + location / { + proxy_set_header Host $host; + proxy_pass http://unicorn; + } + } }