mirror of
https://github.com/YunoHost-Apps/movim_ynh.git
synced 2024-09-03 19:46:19 +02:00
fix
This commit is contained in:
parent
dcee5e6b92
commit
62e9e8d75c
3 changed files with 14 additions and 5 deletions
|
@ -1,16 +1,21 @@
|
|||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||
location __PATH__/ {
|
||||
alias __FINALPATH__/public;
|
||||
alias __FINALPATH__/;
|
||||
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
index index.php;
|
||||
try_files $uri $uri/ /index.php;
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
if ($request_uri ~ "\/movim\/\?infos") {
|
||||
return 403;
|
||||
}
|
||||
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
fastcgi_pass unix:/var/run/php__PHPVERSION__-fpm-__NAME__.sock;
|
||||
fastcgi_pass unix:/var/run/php-fpm-__NAME__.sock;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param REMOTE_USER $remote_user;
|
||||
|
@ -19,7 +24,7 @@ location __PATH__/ {
|
|||
}
|
||||
|
||||
location ~ ^__PATH__/ws/ {
|
||||
proxy_pass http://127.0.0.1:__PORT__;
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
|
@ -52,4 +57,4 @@ location ^~ /movim/config/ {
|
|||
|
||||
location ^~ /movim/?infos {
|
||||
return 403;
|
||||
}
|
||||
}
|
|
@ -137,6 +137,10 @@ cp ../conf/db.example.inc.php $final_path/config/db.inc.php
|
|||
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$final_path/config/db.inc.php"
|
||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/config/db.inc.php"
|
||||
|
||||
## TODO: consider installation in a subpath
|
||||
ynh_replace_string --match_string="'ws/'" --replace_string="'${path_url%/}/ws/'" \
|
||||
--target_file="$final_path/public/scripts/movim_websocket.js"
|
||||
|
||||
ynh_store_file_checksum --file="$final_path/config/db.inc.php"
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -73,7 +73,7 @@ ynh_system_user_create --username=$app
|
|||
#=================================================
|
||||
|
||||
# Restore permissions on app files
|
||||
chown -R root: $final_path
|
||||
chown -R www-data $final_path
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
|
|
Loading…
Reference in a new issue