File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
openresty-proxy/https-proxy Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ init_by_lua_block {
6767 end
6868}
6969
70+ log_format main_with_port '$remote_addr - $remote_user [$time_local] "$request" '
71+ '$status $body_bytes_sent "$http_referer" '
72+ '"$http_user_agent" "port:$server_port"';
73+
7074server {
7175 listen 80 default_server;
7276 listen 443 ssl;
@@ -76,6 +80,7 @@ server {
7680 resolver 127.0.0.11:53 valid=10s;
7781 # resolver_timeout 1s;
7882
83+ access_log /usr/local/openresty/nginx/logs/access.log main_with_port;
7984 error_log /usr/local/openresty/nginx/logs/error.log info;
8085
8186 # 用于满足 Nginx 配置的占位符
@@ -289,6 +294,9 @@ server {
289294 client_max_body_size --client_max_body_size--;
290295
291296 set $proxy_pass_target '';
297+
298+ access_log /usr/local/openresty/nginx/logs/access.log main_with_port;
299+ error_log /usr/local/openresty/nginx/logs/error.log info;
292300
293301 location / {
294302 proxy_set_header Host $host;
You can’t perform that action at this time.
0 commit comments