Permalink
Browse files

nginx.conf

  • Loading branch information...
sorah committed Oct 22, 2017
1 parent c62f60a commit c08e58d9dc621f21d1e99dcc99e5f645c2084b9d
Showing with 47 additions and 33 deletions.
  1. +47 −33 nginx.conf
View
@@ -10,21 +10,21 @@ events {
http {
log_format ltsv "status:$status"
"\ttime:$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";
"\ttime:$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";
access_log /var/log/nginx/access.log ltsv;
error_log /var/log/nginx/error.log warn;
@@ -50,16 +50,26 @@ http {
proxy_buffers 100 32k;
proxy_buffer_size 8k;
#upstream isuda {
# server unix:///tmp/unicorn-isuda.sock fail_timeout=0;
#}
#upstream isutar {
# server unix:///tmp/unicorn-isutar.sock fail_timeout=0;
#}
client_max_body_size 20M;
#upstream rosylilly {
# server 127.0.0.1:5060 fail_timeout=0;
#}
upstream app {
server isu2:5000 fail_timeout=0;
}
server {
listen 0.0.0.0:8080 default_server;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
root /home/isucon/git/webapp/public;
location / {
proxy_pass http://app;
}
}
server {
listen 0.0.0.0:80 default_server;
@@ -69,19 +79,23 @@ http {
proxy_set_header Host $http_host;
proxy_http_version 1.1;
root /home/isucon/isubata/webapp/public;
location /favicon.ico { }
location /fonts/ { }
location /js/ { }
location /css/ { }
location / {
proxy_pass http://app;
}
root /home/isucon/git/webapp/public;
try_files $uri @isuda;
location @app{
#proxy_pass http://127.0.0.1:5000;
proxy_pass @app;
#proxy_pass http://rosylilly;
proxy_pass http://app;
}
#location /stars {
# #proxy_pass http://127.0.0.1:5001;
# proxy_pass http://isutar;
#}
}
}

0 comments on commit c08e58d

Please sign in to comment.