1
0
Fork 0
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:
anmol26s 2018-09-26 14:03:25 +05:30 committed by GitHub
parent b100e303cc
commit 70ad6e925c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 4 deletions

View file

@ -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

View file

@ -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;

View file

@ -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"

View file

@ -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
#================================================= #=================================================