This commit is contained in:
+3
-24
@@ -13,14 +13,13 @@ http {
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host $server_name;
|
||||
#proxy_set_header Upgrade $http_upgrade;
|
||||
#proxy_set_header Connection 'upgrade';
|
||||
#proxy_cache_bypass $http_upgrade;
|
||||
|
||||
#compression settings
|
||||
gzip on;
|
||||
gzip_types text/plain application/xml application/json image/svg+xml text/css;
|
||||
gzip_min_length 1000;
|
||||
|
||||
#custom log format to display the webiste visited and the IP used
|
||||
log_format my_custom_format '$http_host $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"';
|
||||
|
||||
|
||||
@@ -38,6 +37,7 @@ http {
|
||||
proxy_set_header X-Forwarded-Host $server_name;
|
||||
}
|
||||
}
|
||||
|
||||
# Connection header for WebSocket reverse proxy
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
@@ -50,27 +50,6 @@ http {
|
||||
#https://www.tweaked.io/guide/nginx-proxying/
|
||||
proxy_cache_path /tmp/cache levels=1:2 keys_zone=cache:60m max_size=1G;
|
||||
|
||||
# log_format main '$remote_addr - $remote_user [$time_local] '
|
||||
# '"$request" $status $body_bytes_sent '
|
||||
# '"$http_referer" "$http_user_agent" "$gzip_ratio"'
|
||||
# 'host - $host '
|
||||
# '$scheme $proxy_add_x_forwarded_for '
|
||||
# '$remote_addr [$time_local]'
|
||||
# '"$request" $status $body_bytes_sent '
|
||||
# '"$http_referer" "$http_user_agent"'
|
||||
# '"$request" $status $body_bytes_sent '
|
||||
# '"$http_referer" "$http_user_agent" "$gzip_ratio"';
|
||||
|
||||
# log_format upstream_time '$remote_addr - $remote_user [$time_local] '
|
||||
# '"$request" $status $body_bytes_sent '
|
||||
# '"$http_referer" "$http_user_agent"'
|
||||
# 'host + $host '
|
||||
# '$scheme $proxy_add_x_forwarded_for '
|
||||
# '$remote_addr [$time_local]'
|
||||
# '"$request" $status $body_bytes_sent '
|
||||
# '"$http_referer" "$http_user_agent"'
|
||||
# 'rt=$request_time uct="$upstream_connect_time" uht="$upstream_header_time" urt="$upstream_response_time"';
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user