mirror of
https://github.com/YunoHost-Apps/matomo_ynh.git
synced 2024-09-03 19:45:56 +02:00
Update nginx.conf
This commit is contained in:
parent
5cc0031f57
commit
c9c5314939
1 changed files with 13 additions and 8 deletions
|
@ -15,10 +15,17 @@ location __PATH__/ {
|
||||||
|
|
||||||
index index.php;
|
index index.php;
|
||||||
|
|
||||||
## only allow accessing the following php files
|
try_files $uri $uri/ =404;
|
||||||
location ~ ^/(index|matomo|piwik|js/index|plugins/HeatmapSessionRecording/configs)\.php$ {
|
|
||||||
fastcgi_param HTTP_PROXY ""; # prohibit httpoxy: https://httpoxy.org/
|
location ~ [^/]\.php(/|$) {
|
||||||
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; #replace with the path to your PHP socket file
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||||
|
fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock;
|
||||||
|
|
||||||
|
fastcgi_index index.php;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param REMOTE_USER $remote_user;
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
## deny access to all other .php files
|
## deny access to all other .php files
|
||||||
|
@ -27,12 +34,10 @@ location __PATH__/ {
|
||||||
return 403;
|
return 403;
|
||||||
}
|
}
|
||||||
|
|
||||||
try_files $uri $uri/ =404;
|
|
||||||
|
|
||||||
## disable all access to the following directories
|
## disable all access to the following directories
|
||||||
location ~ ^__PATH__/(config|tmp|core|lang) {
|
location ~ ^__PATH__/(config|tmp|core|lang) {
|
||||||
deny all;
|
deny all;
|
||||||
return 403; # replace with 404 to not show these directories exist
|
return 404;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ __PATH__/\.ht {
|
location ~ __PATH__/\.ht {
|
||||||
|
|
Loading…
Reference in a new issue