Skip to content

Commit

Permalink
update log
Browse files Browse the repository at this point in the history
  • Loading branch information
noogen committed Sep 27, 2022
1 parent 1f80088 commit 159e2f0
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 16 deletions.
29 changes: 21 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
version: '2'
# docker-compose example
version: "3.3"

services:
app:
image: niiknow/nginx-image-proxy
restart: always
container_name: nginx-image-proxy
ports:
- '80:80'
- '443:443'

redis:
image: niiknow/nginx-image-proxy:3.1.2
container_name: nginx-image-proxy
ports:
- "80:80"
- "443:443"
volumes:
- "./data/etc/nginx:/etc/nginx:rw"
ulimits:
nproc: 65535
nofile:
soft: 200000
hard: 400000
sysctls:
net.core.somaxconn: '2048'
labels:
- "Nginx Image Proxy"
restart: unless-stopped
13 changes: 5 additions & 8 deletions files/etc/nginx/nginx.new
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,11 @@ http {
server_names_hash_bucket_size 512;

# Log format
log_format main '$realip_remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
log_format better '-= ngx: $status $request_method $scheme://$host$request_uri $request_time '
'$realip_remote_addr $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log better;
log_format main '$time_iso8601 $remote_addr - $realip_remote_addr - $remote_user - $server_name '
'$host "$request" $status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" "upstream - $upstream_addr"';

access_log /var/log/nginx/access.log main;

# Mime settings
include /etc/nginx/mime.types;
Expand Down

0 comments on commit 159e2f0

Please sign in to comment.