1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/onlyoffice_ynh.git synced 2024-09-03 19:56:11 +02:00
This commit is contained in:
ericgaspar 2021-09-18 10:08:59 +02:00
parent 6d1f7791af
commit 3f8f8496c4
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 14 additions and 19 deletions

View file

@ -1,11 +1,16 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent; location / {
location ^~ __PATH__/ {
# Force usage of https
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
proxy_pass http://127.0.0.1:__PORT__/; proxy_pass http://127.0.0.1:__PORT__/;
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection $proxy_connection; #proxy_set_header Connection $proxy_connection;
proxy_set_header Connection "upgrade"; proxy_set_header Connection "upgrade";
proxy_set_header X-Forwarded-Host $server_name__SUB_PATH__; proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect off; proxy_redirect off;

View file

@ -37,16 +37,6 @@
"fr": "Évitez d'installer OnlyOffice sur votre domaine YunoHost principal, surtout si vous voulez l'utiliser avec une instance Nextcloud installée sur le même domaine." "fr": "Évitez d'installer OnlyOffice sur votre domaine YunoHost principal, surtout si vous voulez l'utiliser avec une instance Nextcloud installée sur le même domaine."
} }
}, },
{
"name": "path",
"type": "path",
"example": "/onlyoffice or /",
"help": {
"en": "Root path / if you chose a subdomain, e.g. office.yunohost.domain.",
"fr": "Choisissez le chemin racine / si vous avez choisi un sous-domaine, ex. office.yunohost.domain."
},
"default": "/onlyoffice"
},
{ {
"name": "nextclouddomain", "name": "nextclouddomain",
"type": "string", "type": "string",

View file

@ -17,7 +17,7 @@ old_domain=$YNH_APP_OLD_DOMAIN
old_path=$YNH_APP_OLD_PATH old_path=$YNH_APP_OLD_PATH
new_domain=$YNH_APP_NEW_DOMAIN new_domain=$YNH_APP_NEW_DOMAIN
new_path=$YNH_APP_NEW_PATH new_path="/"
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME

View file

@ -21,7 +21,7 @@ ynh_abort_if_errors
#================================================= #=================================================
domain=$YNH_APP_ARG_DOMAIN domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH path_url="/"
nextclouddomain=$YNH_APP_ARG_NEXTCLOUDDOMAIN nextclouddomain=$YNH_APP_ARG_NEXTCLOUDDOMAIN
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
@ -147,7 +147,7 @@ ynh_store_file_checksum --file="/etc/onlyoffice/documentserver/default.json"
#================================================= #=================================================
# RELOAD ONLYOFFICE # RELOAD ONLYOFFICE
#================================================= #=================================================
ynh_script_progression --message="Reloading RabbitMQ..." ynh_script_progression --message="Enable RabbitMQ..."
systemctl enable rabbitmq-server systemctl enable rabbitmq-server
@ -156,7 +156,7 @@ systemctl enable rabbitmq-server
#================================================= #=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
yunohost service add rabbitmq-server --description="A short description of the app" --log="/var/log/$app/$app.log" yunohost service add rabbitmq-server --description="Multi-protocol messaging broker" --log="/var/log/$app/$app.log"
# Start a systemd service # Start a systemd service
ynh_systemd_action --service_name=rabbitmq-server --action="start" --log_path="systemd" ynh_systemd_action --service_name=rabbitmq-server --action="start" --log_path="systemd"