File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,7 @@ events {
10
10
}
11
11
12
12
http {
13
- log_format main '$remote_addr - $remote_user [$time_local ] "$request " '
14
- '$status $body_bytes_sent "$http_referer " '
15
- '"$http_user_agent " "$http_x_forwarded_for "' ;
13
+ log_format main '$remote_addr - $remote_user [$time_local ] "$request " ' '$status $body_bytes_sent "$http_referer " ' '"$http_user_agent " "$http_x_forwarded_for "' ;
16
14
17
15
access_log off ;
18
16
Original file line number Diff line number Diff line change 7
7
cp -r /etc/nginx/* /tmp/proxy_nginx/
8
8
sed ' s|\(worker_connections\) [[:digit:]]*;|\1 ' $NGINX_WORKER_CONNECTIONS ' ;|g' -i /tmp/proxy_nginx/nginx.conf
9
9
sed " s/\(worker_processes\).*/\1 $NGINX_WORKER_PROCESSES ;/" -i /tmp/proxy_nginx/nginx.conf
10
+ if [[ -n " $NGINX_LOG_FORMAT " ]]; then
11
+ sed " s/\(log_format main\).*/\1 '$NGINX_LOG_FORMAT ';/" -i /tmp/proxy_nginx/nginx.conf
12
+ fi
10
13
if [ $NGINX_ACCESS_LOG != " off" ]; then
11
14
sed ' s|#*\(\s*access_log\).*;|\1 /var/log/nginx/access.log ' $NGINX_ACCESS_LOG ' ;|g' -i /tmp/proxy_nginx/nginx.conf
12
15
fi
You can’t perform that action at this time.
0 commit comments