1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/owntracks_ynh.git synced 2024-09-03 19:56:24 +02:00
This commit is contained in:
Éric Gaspar 2023-10-17 09:36:57 +02:00 committed by Félix Piédallu
parent 3b6025bfa9
commit 5c73a1f13d
4 changed files with 14 additions and 35 deletions

View file

@ -1,39 +1,16 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
# Path to source
alias __INSTALL_DIR__/ ;
index index.php;
try_files $uri $uri/ /owntracks/index.php?$args;
# Prevent useless logs
location = __PATH__/favicon.ico {
log_not_found off;
access_log off;
}
location = __PATH__/robots.txt {
allow all;
log_not_found off;
access_log off;
}
# Deny access to hidden files and directories
location ~ ^/__PATH__/(.+/|)\.(?!well-known\/) {
deny all;
}
location ~ [^/]\.php(/|$) {
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;
}
# Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc;
proxy_pass https://127.0.0.1:__PORT__;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
# WebSocket support
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

View file

@ -53,6 +53,8 @@ ram.runtime = "50M"
[resources.install_dir]
[resources.ports]
[resources.permissions]
main.url = "/"