mirror of
https://github.com/YunoHost-Apps/yourls_ynh.git
synced 2024-09-03 20:35:59 +02:00
fix installation on subdomain root
This commit is contained in:
parent
ed3203a78f
commit
d532eb3de9
2 changed files with 5 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
location PATHTOCHANGE {
|
||||
alias ALIASTOCHANGE;
|
||||
location LOCATIONTOCHANGE {
|
||||
alias ALIASTOCHANGE/;
|
||||
|
||||
try_files $uri $uri/ PATHTOCHANGE/yourls-loader.php;
|
||||
|
||||
|
@ -16,4 +16,4 @@ location PATHTOCHANGE {
|
|||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,9 +18,6 @@ if [[ ! $? -eq 0 ]]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Remove trailing "/" for next commands
|
||||
path=${path%/}
|
||||
|
||||
# Generate random password
|
||||
db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d 'A-Za-z0-9' | sed -n 's/\(.\{24\}\).*/\1/p')
|
||||
|
||||
|
@ -54,7 +51,8 @@ sudo sed -i "s/_yourlspath$path/g" $final_path/user/config.php
|
|||
sudo chown -R www-data: $final_path
|
||||
|
||||
# Modify Nginx configuration file and copy it to Nginx conf directory
|
||||
sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf*
|
||||
sed -i "s@LOCATIONTOCHANGE@$path@g" ../conf/nginx.conf*
|
||||
sed -i "s@PATHTOCHANGE@${path%/}@g" ../conf/nginx.conf*
|
||||
sed -i "s@DOMAINTOCHANGE@$domain@g" ../conf/nginx.conf*
|
||||
sed -i "s@ALIASTOCHANGE@$final_path@g" ../conf/nginx.conf*
|
||||
nginxconf=/etc/nginx/conf.d/$domain.d/yourls.conf
|
||||
|
|
Loading…
Reference in a new issue