Re-do the tracking section
This commit is contained in:
parent
f0135e4e54
commit
fd00d16c37
3 changed files with 96 additions and 106 deletions
|
|
@ -45,6 +45,7 @@ COPY --from=builder /app/dist /usr/share/nginx/html
|
|||
COPY --from=builder /app/public/images/ /usr/share/nginx/html/images/
|
||||
COPY --from=builder /app/public/subtitles /usr/share/nginx/html/subtitles
|
||||
COPY --from=builder /app/public/transcriptions /usr/share/nginx/html/transcriptions
|
||||
COPY matomo_log_format.conf /etc/nginx/conf.d/
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Add runner stage verification to the file
|
||||
|
|
|
|||
4
matomo_log_format.conf
Normal file
4
matomo_log_format.conf
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
log_format matomo_tracking '$remote_addr - $remote_user [$time_local] '
|
||||
'"$request" $status $body_bytes_sent '
|
||||
'"$http_referer" "$http_user_agent" '
|
||||
'$request_time';
|
||||
25
nginx.conf
25
nginx.conf
|
|
@ -1,24 +1,10 @@
|
|||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
# Matomo tracking log format
|
||||
log_format matomo_tracking '$remote_addr - $remote_user [$time_local] '
|
||||
'"$request" $status $body_bytes_sent '
|
||||
'"$http_referer" "$http_user_agent" '
|
||||
'$request_time';
|
||||
|
||||
# Compression
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
server {
|
||||
listen 804;
|
||||
server_name localhost;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Log paths and format
|
||||
# Updated log paths and format
|
||||
access_log /var/log/nginx/deafgain-website/access.log matomo_tracking buffer=512k flush=1m;
|
||||
error_log /var/log/nginx/deafgain-website/error.log error;
|
||||
|
||||
|
|
@ -34,6 +20,10 @@ http {
|
|||
add_header X-Content-Type-Options "nosniff";
|
||||
add_header Strict-Transport-Security "max-age=31536000";
|
||||
|
||||
# Compression
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
# API endpoint
|
||||
location /api/contact {
|
||||
proxy_pass http://api:3000;
|
||||
|
|
@ -114,8 +104,3 @@ http {
|
|||
add_header Cache-Control "public, no-transform";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue