mirror of
https://github.com/YunoHost-Apps/jappix_ynh.git
synced 2024-09-03 19:26:19 +02:00
Merge branch 'master' of https://github.com/titoko/jappix_ynh
This commit is contained in:
commit
89e151a8e5
2 changed files with 11 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
location PATHTOCHANGE/ {
|
||||
location PATHTOCHANGE {
|
||||
alias ALIASTOCHANGE ;
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
|
@ -14,7 +14,7 @@ location PATHTOCHANGE/ {
|
|||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
}
|
||||
location PATHTOCHANGE/http-bind {
|
||||
location PATHTOCHANGE2/http-bind {
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
|
|
@ -11,9 +11,10 @@ exit 1
|
|||
fi
|
||||
|
||||
# Remove trailing "/" for next commands
|
||||
if [ ! $path -lt 2 ]; then
|
||||
path=${path%/}
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
# Generate random DES key & password
|
||||
deskey=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]' | sed -n 's/\(.\{24\}\).*/\1/p')
|
||||
|
@ -30,6 +31,12 @@ db_pwd=$(dd if=/dev/urandom bs=1 count=200 2> /dev/null | tr -c -d '[A-Za-z0-9]'
|
|||
sudo chown -R www-data: $final_path
|
||||
|
||||
# Modify Nginx configuration file and copy it to Nginx conf directory
|
||||
sudo sed -i "s@PATHTOCHANGE2@$path@g" ../conf/nginx.conf
|
||||
|
||||
if [ -z "$path" ]; then
|
||||
path="/"
|
||||
fi
|
||||
|
||||
sudo sed -i "s@PATHTOCHANGE@$path@g" ../conf/nginx.conf
|
||||
sudo sed -i "s@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf
|
||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/jappix.conf
|
||||
|
|
Loading…
Add table
Reference in a new issue