Move logging to http section
This commit is contained in:
parent
13d137847c
commit
f0135e4e54
1 changed files with 93 additions and 84 deletions
29
nginx.conf
29
nginx.conf
|
|
@ -1,8 +1,6 @@
|
|||
server {
|
||||
listen 804;
|
||||
server_name localhost;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
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] '
|
||||
|
|
@ -10,7 +8,17 @@ server {
|
|||
'"$http_referer" "$http_user_agent" '
|
||||
'$request_time';
|
||||
|
||||
# Updated log paths and format
|
||||
# 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
|
||||
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;
|
||||
|
||||
|
|
@ -26,10 +34,6 @@ server {
|
|||
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;
|
||||
|
|
@ -109,4 +113,9 @@ server {
|
|||
expires 30d;
|
||||
add_header Cache-Control "public, no-transform";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue