47 lines
1.6 KiB
Nginx Configuration File
Raw Normal View History

server {
2016-09-17 15:53:34 +02:00
listen 8888;
root /piwik;
index index.php index.html;
2016-04-11 15:59:32 +02:00
2016-09-17 15:53:34 +02:00
location ~* \.(?:bat|git|ini|sh|svn[^.]*|txt|tpl|xml)$ {
return 404;
}
2016-04-11 15:59:32 +02:00
2016-09-17 15:53:34 +02:00
location ~* \.(jpg|jpeg|gif|css|png|js|map|woff|woff2|ttf|svg|eot)$ {
expires 30d;
access_log off;
2016-04-11 15:59:32 +02:00
}
2016-09-17 15:53:34 +02:00
location = /favicon.ico {
try_files /favicon.ico =204;
}
2016-04-11 15:59:32 +02:00
2016-09-17 15:53:34 +02:00
location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
return 404;
}
2016-04-11 15:59:32 +02:00
location ~ ^/(vendor|config|tmp|libs|misc) {
deny all;
return 404;
}
location ~* /(.*)\.(?:markdown|md|twig|yaml|yml|ht|htaccess|ini)$ {
deny all;
}
location ~ /\. {
deny all;
}
2016-09-17 15:53:34 +02:00
location / {
try_files $uri /index.php;
}
2016-04-11 15:59:32 +02:00
location ~ \.php$ {
2016-09-17 15:53:34 +02:00
fastcgi_index index.php;
fastcgi_pass unix:/php/run/php-fpm.sock;
2016-09-17 15:53:34 +02:00
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /nginx/conf/fastcgi_params;
2016-04-11 15:59:32 +02:00
}
}