Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nginx LTSV logs #1

Merged
merged 3 commits into from Oct 20, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -11,5 +11,5 @@ ansible-playbook -u isucon -c paramiko -kKs -i hosts site.yml
*without password*

```
ansible-playbook -u isucon -c paramiko -i hosts site.yml
ansible-playbook -u isucon -c paramiko -s -i hosts site.yml
```
1 change: 1 addition & 0 deletions webapp/docker-compose.yml
Expand Up @@ -4,6 +4,7 @@ services:
image: nginx:1.15.3-alpine
volumes:
- ./nginx:/etc/nginx
- ./log:/log
ports:
- "443:443"
links:
Expand Down
Empty file added webapp/log/.gitkeep
Empty file.
22 changes: 20 additions & 2 deletions webapp/nginx/nginx.conf
Expand Up @@ -3,9 +3,27 @@ events {
}

http {
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";

default_type application/octet-stream;
error_log /dev/stdout error;
access_log /dev/stdout combined;
# error_log /dev/stdout error;
# access_log /dev/stdout ltsv;
access_log /log/access.ltsv.log ltsv;
error_log /log/error.log;

ssl_certificate /etc/nginx/_.isucon8.flying-chair.net.crt;
ssl_certificate_key /etc/nginx/_.isucon8.flying-chair.net.key;
Expand Down