mirror of
https://github.com/YunoHost-Apps/etherpad_ynh.git
synced 2024-09-03 18:36:10 +02:00
commit
2b99110f51
3 changed files with 9 additions and 14 deletions
|
@ -1,11 +1,6 @@
|
|||
location PATHTOCHANGE {
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
rewrite PATHTOCHANGE/(.*) /$1 break;
|
||||
location PATHTOCHANGE/ {
|
||||
rewrite ^PATHTOCHANGE$ PATHTOCHANGE/ permanent;
|
||||
proxy_pass http://localhost:9001/;
|
||||
proxy_redirect / PATHTOCHANGE/;
|
||||
proxy_set_header Host $host;
|
||||
proxy_buffering off;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
location / {
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
proxy_pass http://localhost:9001/;
|
||||
proxy_set_header Host $host;
|
||||
# be carefull, this line doesn't override any proxy_buffering on set in a conf.d/file.conf
|
||||
# be careful, this line doesn't override any proxy_buffering on set in a conf.d/file.conf
|
||||
proxy_buffering off;
|
||||
}
|
||||
|
|
|
@ -11,6 +11,9 @@ 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')
|
||||
|
||||
|
@ -55,16 +58,16 @@ 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@ALIASTOCHANGE@$final_path/@g" ../conf/nginx.conf*
|
||||
if [ $path != "/" ];
|
||||
if [ "$path" = "" ];
|
||||
then
|
||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/etherpadlite.conf
|
||||
else
|
||||
sudo cp ../conf/nginx.conf-nosub /etc/nginx/conf.d/$domain.d/etherpadlite.conf
|
||||
else
|
||||
sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/etherpadlite.conf
|
||||
fi
|
||||
|
||||
# Reload Nginx and regenerate SSOwat conf
|
||||
sudo service nginx reload
|
||||
if [ $is_public = "Yes" ];
|
||||
if [ "$is_public" = "Yes" ];
|
||||
then
|
||||
sudo yunohost app setting etherpadlite skipped_uris -v "/"
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue