mirror of
https://github.com/YunoHost-Apps/yourls_ynh.git
synced 2024-09-03 20:35:59 +02:00
Sub-path fix and allow users to register other then yunohost (#4)
* nginx fix for sub-path * sab-path fix https://github.com/YunoHost-Apps/yourls_ynh/issues/3 * sab-path fix * Registraion of other users then YNH
This commit is contained in:
parent
b100e303cc
commit
70ad6e925c
4 changed files with 9 additions and 4 deletions
|
@ -7,7 +7,7 @@
|
||||||
; Manifest
|
; Manifest
|
||||||
domain="domain.tld" (DOMAIN)
|
domain="domain.tld" (DOMAIN)
|
||||||
path="/path" (PATH)
|
path="/path" (PATH)
|
||||||
admin="john" (USER)
|
admin="john" (admin)
|
||||||
password="yourls123" (password)
|
password="yourls123" (password)
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=1
|
||||||
|
|
|
@ -6,7 +6,7 @@ location __PATH__ {
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
}
|
}
|
||||||
|
|
||||||
try_files $uri $uri/ /yourls-loader.php;
|
try_files $uri $uri/ __PATHTOCHANGE__/yourls-loader.php;
|
||||||
|
|
||||||
|
|
||||||
index index.php index.html index.htm;
|
index index.php index.html index.htm;
|
||||||
|
|
|
@ -51,9 +51,9 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "admin",
|
"name": "admin",
|
||||||
"type": "user",
|
"type": "admin",
|
||||||
"ask": {
|
"ask": {
|
||||||
"en": "Choose the Yourls administrator (can be other then YunoHOst registered user)",
|
"en": "Choose a Yourls administrator (can be other then YunoHost registered user)",
|
||||||
"fr": "Administrateur du site Yourls"
|
"fr": "Administrateur du site Yourls"
|
||||||
},
|
},
|
||||||
"example": "yoda"
|
"example": "yoda"
|
||||||
|
|
|
@ -86,6 +86,11 @@ ynh_setup_source "$final_path"
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
|
if [ "$path_url" != "/" ]; then
|
||||||
|
ynh_replace_string "__PATHTOCHANGE__" "$path_url" "../conf/nginx.conf"
|
||||||
|
else
|
||||||
|
ynh_replace_string "__PATHTOCHANGE__" " " "../conf/nginx.conf"
|
||||||
|
fi
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue