You've already forked matrix-docker-ansible-deploy
mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2025-08-04 21:43:06 +02:00
update nginx configs for cinny, hydrogen, and synapse reverse proxy companion with ip anonymization
This commit is contained in:
@ -31,9 +31,15 @@ http {
|
|||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
|
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
map $remote_addr $remote_addr_anon {
|
||||||
'$status $body_bytes_sent "$http_referer" '
|
~(?P<ip>\d+\.\d+\.\d+)\. $ip.0;
|
||||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
~(?P<ip>[^:]+:[^:]+): $ip::;
|
||||||
|
default 0.0.0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
log_format main '$remote_addr_anon - $remote_user [$time_local] "$request" '
|
||||||
|
'$status $body_bytes_sent "$http_referer" '
|
||||||
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
|
|
||||||
access_log /var/log/nginx/access.log main;
|
access_log /var/log/nginx/access.log main;
|
||||||
|
|
||||||
|
@ -31,9 +31,15 @@ http {
|
|||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
|
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
map $remote_addr $remote_addr_anon {
|
||||||
'$status $body_bytes_sent "$http_referer" '
|
~(?P<ip>\d+\.\d+\.\d+)\. $ip.0;
|
||||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
~(?P<ip>[^:]+:[^:]+): $ip::;
|
||||||
|
default 0.0.0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
log_format main '$remote_addr_anon - $remote_user [$time_local] "$request" '
|
||||||
|
'$status $body_bytes_sent "$http_referer" '
|
||||||
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
|
|
||||||
access_log /var/log/nginx/access.log main;
|
access_log /var/log/nginx/access.log main;
|
||||||
|
|
||||||
|
@ -33,9 +33,15 @@ http {
|
|||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
default_type application/octet-stream;
|
default_type application/octet-stream;
|
||||||
|
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
map $remote_addr $remote_addr_anon {
|
||||||
'$status $body_bytes_sent "$http_referer" '
|
~(?P<ip>\d+\.\d+\.\d+)\. $ip.0;
|
||||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
~(?P<ip>[^:]+:[^:]+): $ip::;
|
||||||
|
default 0.0.0.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
log_format main '$remote_addr_anon - $remote_user [$time_local] "$request" '
|
||||||
|
'$status $body_bytes_sent "$http_referer" '
|
||||||
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
|
|
||||||
{% if matrix_synapse_reverse_proxy_companion_access_log_enabled %}
|
{% if matrix_synapse_reverse_proxy_companion_access_log_enabled %}
|
||||||
access_log /var/log/nginx/access.log main;
|
access_log /var/log/nginx/access.log main;
|
||||||
|
Reference in New Issue
Block a user