Skip to content

Commit cab6d74

Browse files
authored
Merge pull request #21 from bamboooo-dev/feat/add-request-body-in-nchan-log
Feat/add request body in nchan log
2 parents 853d79b + 68fa1f7 commit cab6d74

File tree

4 files changed

+38
-3
lines changed

4 files changed

+38
-3
lines changed

docker-compose-prod.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ services:
1515
ports:
1616
- 80:80
1717
volumes:
18-
- ./nginx:/etc/nginx/conf.d
18+
- ./nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
19+
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
1920
depends_on:
2021
- redis
2122
networks:

docker-compose.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ services:
2121
ports:
2222
- 80:80
2323
volumes:
24-
- ./nginx:/etc/nginx/conf.d
24+
- ./nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
25+
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
2526
depends_on:
2627
- redis
2728
ingame:
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,3 @@ server {
4343
nchan_redis_pass my_redis_server;
4444
}
4545
}
46-

nginx/nginx.conf

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# load Nchan module
2+
load_module /usr/local/nginx/modules/ngx_nchan_module.so;
3+
4+
user nginx;
5+
worker_processes 1;
6+
7+
error_log /var/log/nginx/error.log warn;
8+
pid /var/run/nginx.pid;
9+
10+
11+
events {
12+
worker_connections 1024;
13+
}
14+
15+
16+
http {
17+
include /etc/nginx/mime.types;
18+
default_type application/octet-stream;
19+
20+
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
21+
'$status $body_bytes_sent "$http_referer" "$request_body"'
22+
'"$http_user_agent" "$http_x_forwarded_for"';
23+
24+
access_log /var/log/nginx/access.log main;
25+
26+
sendfile on;
27+
#tcp_nopush on;
28+
29+
keepalive_timeout 65;
30+
31+
#gzip on;
32+
33+
include /etc/nginx/conf.d/*.conf;
34+
}

0 commit comments

Comments
 (0)