%PDF- %PDF-
| Direktori : /proc/self/root/etc/nginx/sites-enabled/ |
| Current File : //proc/self/root/etc/nginx/sites-enabled/stats.varak.net |
server {
listen 10.27.27.5:80;
server_name stats.varak.net;
rewrite ^/(.*) https://stats.varak.net$request_uri permanent;
}
server {
listen 10.27.27.5:443 ssl http2;
server_name stats.varak.net;
include ssl_params;
ssl_certificate /etc/letsencrypt/live/varak.net-0001/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/varak.net-0001/privkey.pem; # managed by Certbot
client_max_body_size 50m;
add_header Referrer-Policy origin always; # make sure outgoing links don't show the URL to the Matomo instance
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
root /www/varak.net/stats.varak.net;
location / {
index index.html index.htm index.php;
autoindex off;
autoindex_exact_size off;
# try_files $uri $uri/ /index.php?$args;
}
# location ~ \.php$ {
location ~ ^/(index|matomo|piwik|js/index|plugins/HeatmapSessionRecording/configs)\.php$ {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /www/varak.net/stats.varak.net$fastcgi_script_name;
}
location ~* ^.+\.php$ {
deny all;
return 403;
}
location ~ ^/(config|tmp|core|lang) {
deny all;
return 403; # replace with 404 to not show these directories exist
}
location ~ js/container_.*_preview\.js$ {
expires off;
add_header Cache-Control 'private, no-cache, no-store';
}
location ~ \.(gif|ico|jpg|png|svg|js|css|htm|html|mp3|mp4|wav|ogg|avi|ttf|eot|woff|woff2|json)$ {
allow all;
## Cache images,CSS,JS and webfonts for an hour
## Increasing the duration may improve the load-time, but may cause old files to show after an Matomo upgrade
expires 1h;
add_header Pragma public;
add_header Cache-Control "public";
}
location ~ ^/(libs|vendor|plugins|misc|node_modules) {
deny all;
return 403;
}
## properly display textfiles in root directory
location ~/(.*\.md|LEGALNOTICE|LICENSE) {
default_type text/plain;
}
}