Permalink
Browse files

Merge pull request #12 from shibayu36/nginx

nginxの設定
  • Loading branch information...
shibayu36 committed Sep 16, 2018
2 parents ea8779d + b8ad6cd commit 8e4ec6e42e5b911c5a2c9f4ab7056649ae1fa205
Showing with 65 additions and 0 deletions.
  1. +65 −0 conf/nginx.conf
@@ -0,0 +1,65 @@
user isucon;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
log_format ltsv "time:$time_local"
"\thost:$remote_addr"
"\tforwardedfor:$http_x_forwarded_for"
"\treq:$request"
"\tstatus:$status"
"\tmethod:$request_method"
"\turi:$request_uri"
"\tsize:$body_bytes_sent"
"\treferer:$http_referer"
"\tua:$http_user_agent"
"\treqtime:$request_time"
"\tcache:$upstream_http_x_cache"
"\truntime:$upstream_http_x_runtime"
"\tapptime:$upstream_response_time"
"\tvhost:$host";
access_log /var/log/nginx/access.log.tsv ltsv;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name torb.example.com;
client_max_body_size 20M;
root /home/isucon/torb/webapp/static;
location /favicon.ico { }
location /fonts/ { }
location /js/ { }
location /css/ { }
location / {
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:8080;
}
}
}

0 comments on commit 8e4ec6e

Please sign in to comment.