Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Commit

Permalink
nginx log format
Browse files Browse the repository at this point in the history
  • Loading branch information
procrastinatio committed Apr 10, 2018
1 parent 2a42ac7 commit de8ed9b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dev.env
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ PRINT_TEMP_DIR=/var/local/print
PRINT_LOGLEVEL=10
DEBUG=True
CATALINA_OPTS=2g
NGINX_LOG_LEVEL=debug
NGINX_LOG_LEVEL=warn
NGINX_WORKERS=8
1 change: 1 addition & 0 deletions nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ FROM nginx:1.13.3
RUN apt-get update && apt-get remove -y nginx && apt-get install -y gettext bash nginx-full
RUN rm /etc/nginx/nginx.conf /etc/nginx/conf.d/default.conf
COPY . /.
COPY log_format.conf /etc/nginx/log_format.conf
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"]
7 changes: 4 additions & 3 deletions nginx/nginx.conf.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ events {
http {
# if we use analytics we may want to turn that off
# log_format postdata $request_body;
log_format postdata '$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" "$request_body"';
# use include because impossible to escape correctly

include log_format.conf;

access_log /dev/stdout combined;
sendfile off;

Expand Down

0 comments on commit de8ed9b

Please sign in to comment.