mirror of
https://github.com/YunoHost-Apps/onlyoffice_ynh.git
synced 2024-09-03 19:56:11 +02:00
fix and clean
This commit is contained in:
parent
780db1827a
commit
07dabdf166
4 changed files with 17 additions and 23 deletions
|
@ -6,7 +6,7 @@ location ^~ __PATH__/ {
|
||||||
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_set_header X-Forwarded-Host $server_name;
|
proxy_set_header X-Forwarded-Host $server_name;
|
||||||
add_header X-Frame-Options "ALLOW-FROM https://__DOMAIN__/";
|
add_header X-Frame-Options "ALLOW-FROM https://__NEXTCLOUDDOMAIN__/";
|
||||||
|
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
# static files
|
|
||||||
location ^~ /loleaflet {
|
|
||||||
proxy_pass http://localhost:__PORT__;
|
|
||||||
proxy_set_header Host $http_host;
|
|
||||||
}
|
|
||||||
|
|
||||||
# WOPI discovery URL
|
|
||||||
location ^~ /hosting/discovery {
|
|
||||||
proxy_pass http://localhost:__PORT__;
|
|
||||||
proxy_set_header Host $http_host;
|
|
||||||
}
|
|
||||||
|
|
||||||
# websockets, download, presentation and image upload
|
|
||||||
location ^~ /lool {
|
|
||||||
proxy_pass http://localhost:__PORT__;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "upgrade";
|
|
||||||
proxy_set_header Host $http_host;
|
|
||||||
}
|
|
|
@ -32,6 +32,17 @@
|
||||||
"example": "example.com"
|
"example": "example.com"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
"name": "nextclouddomain",
|
||||||
|
"type": "string",
|
||||||
|
"ask": {
|
||||||
|
"en": "The domain of your Nextcloud instance",
|
||||||
|
"fr": "Le domain de votre instance Nextcloud"
|
||||||
|
},
|
||||||
|
"example": "example.com",
|
||||||
|
"default": ""
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
"name": "path",
|
"name": "path",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
|
|
|
@ -28,6 +28,7 @@ ynh_abort_if_errors
|
||||||
domain=$YNH_APP_ARG_DOMAIN
|
domain=$YNH_APP_ARG_DOMAIN
|
||||||
path_url=$YNH_APP_ARG_PATH
|
path_url=$YNH_APP_ARG_PATH
|
||||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||||
|
nextcloud_domain=$YNH_APP_ARG_NEXTCLOUDDOMAIN
|
||||||
|
|
||||||
### If it's a multi-instance app, meaning it can be installed several times independently
|
### If it's a multi-instance app, meaning it can be installed several times independently
|
||||||
### The id of the app as stated in the manifest is available as $YNH_APP_ID
|
### The id of the app as stated in the manifest is available as $YNH_APP_ID
|
||||||
|
@ -63,6 +64,7 @@ ynh_webpath_register $app $domain $path_url
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_app_setting_set $app domain $domain
|
ynh_app_setting_set $app domain $domain
|
||||||
|
ynh_app_setting_set $app nextcloud_domain $nextcloud_domain
|
||||||
ynh_app_setting_set $app path $path_url
|
ynh_app_setting_set $app path $path_url
|
||||||
ynh_app_setting_set $app is_public $is_public
|
ynh_app_setting_set $app is_public $is_public
|
||||||
|
|
||||||
|
@ -147,6 +149,7 @@ sudo apt-get install -y onlyoffice-documentserver
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Create a dedicated nginx config
|
# Create a dedicated nginx config
|
||||||
|
#ynh_replace_string "__NEXTCLOUDDOMAIN__" "$nextcloud_domain" "../conf/nginx.conf"
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -163,15 +166,14 @@ ynh_system_user_create $app
|
||||||
# Fix https://github.com/ONLYOFFICE/onlyoffice-owncloud/issues/172#issuecomment-411746394
|
# Fix https://github.com/ONLYOFFICE/onlyoffice-owncloud/issues/172#issuecomment-411746394
|
||||||
cp -a ../conf/default.json /etc/onlyoffice/documentserver/default.json
|
cp -a ../conf/default.json /etc/onlyoffice/documentserver/default.json
|
||||||
|
|
||||||
|
#ynh_replace_string "__NEXTCLOUDDOMAIN__" "$nextcloud_domain" "/etc/nginx/conf.d/$domain.d/onlyoffice.conf"
|
||||||
|
|
||||||
# Fix Nextcloud http://dev.onlyoffice.org/viewtopic.php?f=53&t=10001
|
# Fix Nextcloud http://dev.onlyoffice.org/viewtopic.php?f=53&t=10001
|
||||||
#sed -i "/# Add headers to serve security.*/a \ \ \ \ add_header X-Frame-Options \"ALLOW-FROM https://$domain/\";" /etc/nginx/conf.d/$nextcloud_domain.d/nextcloud.conf
|
#sed -i "/# Add headers to serve security.*/a \ \ \ \ add_header X-Frame-Options \"ALLOW-FROM https://$domain/\";" /etc/nginx/conf.d/$nextcloud_domain.d/nextcloud.conf
|
||||||
|
|
||||||
# Fix OnlyOffice http://dev.onlyoffice.org/viewtopic.php?f=53&t=10001
|
# Fix OnlyOffice http://dev.onlyoffice.org/viewtopic.php?f=53&t=10001
|
||||||
#sed -i "/# Add headers to serve security.*/a \ \ \ \ add_header X-Frame-Options \"ALLOW-FROM https://$domain/\";" /etc/nginx/conf.d/$domain.d/onlyoffice.conf
|
#sed -i "/# Add headers to serve security.*/a \ \ \ \ add_header X-Frame-Options \"ALLOW-FROM https://$domain/\";" /etc/nginx/conf.d/$domain.d/onlyoffice.conf
|
||||||
|
|
||||||
#cp -a ../conf/onlyoffice-documentserver.conf /etc/onlyoffice/documentserver/nginx/onlyoffice-documentserver.conf
|
|
||||||
#ynh_replace_string "__NEXTCLOUDDOMAIN__" "$nextcloud_domain" "/etc/loolwsd/loolwsd.xml"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE THE CONFIG FILE CHECKSUM
|
# STORE THE CONFIG FILE CHECKSUM
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue