mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-08-29 15:06:26 +02:00
implemented cross-domain matomo tracking on nginx level
This commit is contained in:
18
roles/nginx-docker-reverse-proxy/templates/domain.conf.j2
Normal file
18
roles/nginx-docker-reverse-proxy/templates/domain.conf.j2
Normal file
@@ -0,0 +1,18 @@
|
||||
server
|
||||
{
|
||||
server_name {{domain}};
|
||||
|
||||
{% if nginx_matomo_tracking_active | default(False) %}
|
||||
{% include 'roles/nginx-matomo-tracking/templates/matomo-tracking.conf.j2' %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if client_max_body_size is defined %}
|
||||
client_max_body_size {{ client_max_body_size }};
|
||||
{% endif %}
|
||||
|
||||
{% include 'roles/letsencrypt/templates/ssl_header.j2' %}
|
||||
|
||||
{% include 'proxy_pass.conf.j2' %}
|
||||
|
||||
}
|
@@ -0,0 +1,25 @@
|
||||
location /
|
||||
{
|
||||
proxy_pass http://127.0.0.1:{{http_port}}/;
|
||||
|
||||
# headers
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
proxy_set_header X-Forwarded-Port 443;
|
||||
|
||||
# WebSocket specific header
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
# deactivate buffering
|
||||
proxy_buffering off;
|
||||
proxy_request_buffering off;
|
||||
|
||||
# timeouts
|
||||
proxy_connect_timeout 1s;
|
||||
proxy_send_timeout 900s;
|
||||
proxy_read_timeout 900s;
|
||||
send_timeout 900s;
|
||||
}
|
Reference in New Issue
Block a user