I am working on a server with a misconfiguration on nextcloud.api permission. What I know is that : "the nextcloud url was changed, but after deleting the old domain nextcloud stopped working"
I see that in /etc/ssowat/conf.json the url is wrong in nextcloud.api
* I think that the [change_url](scripts/change_url) is not complete but maybe not : I didn't tried again to reproduce it.
* Note : I solved the problem for myself, so I'll report it here if it helps improve the package or helps others
### Context
- Hardware: *VPS bought online *
- YunoHost version: 11.2.5 (but I don't know what the version was when the url was changed)
- I have access to my server: *Through SSH*
- Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: *no*
### Steps to reproduce
- *Change nextcloud url* (I don't know more about what was done exactly)
### Expected behavior
*The api url should also have changed but it remains on the last url*
### Logs
I have no history of this action. I started working on the server after the action had been performed. I've just seen that it wasn't done correctly
### To resolve
Actions to resolve the problem :
After changing url the api url wasn't changed
nextcloud.api
permission. What I know is that : "the nextcloud url was changed, but after deleting the old domain nextcloud stopped working"/etc/ssowat/conf.json
the url is wrong innextcloud.api
source /usr/share/yunohost/helpers cat /etc/yunohost/apps/nextcloud/settings.yml new_domain=new_domain.tld url="re:$new_domain\/.well-known\/.*" app=nextcloud
ynh_permission_url --permission "api" --clear_urls ynh_permission_url --permission "api" --url="$url" --auth_header="false"
=================================================
CHANGE API URL SSOWAT
=================================================
ynh_permission_url --permission "api" --clear_urls ynh_permission_url --permission "api" --url="$url" --auth_header="false"