{"action":"created","issue":{"url":"https://api.github.com/repos/YunoHost/moulinette-yunohost/issues/71","labels_url":"https://api.github.com/repos/YunoHost/moulinette-yunohost/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/YunoHost/moulinette-yunohost/issues/71/comments","events_url":"https://api.github.com/repos/YunoHost/moulinette-yunohost/issues/71/events","html_url":"https://github.com/YunoHost/moulinette-yunohost/issues/71","id":93990775,"number":71,"title":"Changing default domain / remove domain are not efficients","user":{"login":"julpec","id":8127324,"avatar_url":"https://avatars.githubusercontent.com/u/8127324?v=3","gravatar_id":"","url":"https://api.github.com/users/julpec","html_url":"https://github.com/julpec","followers_url":"https://api.github.com/users/julpec/followers","following_url":"https://api.github.com/users/julpec/following{/other_user}","gists_url":"https://api.github.com/users/julpec/gists{/gist_id}","starred_url":"https://api.github.com/users/julpec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julpec/subscriptions","organizations_url":"https://api.github.com/users/julpec/orgs","repos_url":"https://api.github.com/users/julpec/repos","events_url":"https://api.github.com/users/julpec/events{/privacy}","received_events_url":"https://api.github.com/users/julpec/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-09T08:34:49Z","updated_at":"2015-08-19T10:13:31Z","closed_at":null,"body":"Hello\r\n\r\nI try in english first (sorry for the bad expression) : \r\n\r\nI tried to build a custom image for labriqueinternet in order to have an easy to use configuration for a end-user. For that, I need to install some apps and define a false domain name (that will be changed after first configuration by the end-user), all of this before building the image of course. So, moulinette must have the hability to properly remove the default domain and to re-assign a new default domain to the installed apps.\r\n\r\nSo, what I did is to add a new domain (`new.domain.org`). For that, no problems.\r\nI tried to remove the default domain (`old.domain.org`) but it tell me that I can't because some apps are installed on this domain. But there is no possibility to change the domain for this apps. The only solution is to remove them that is pretty bad if you have configurations.\r\n\r\nSo, I tried to make it manually, just to test ;)\r\n\r\nI changed the domain option in the `settings.yml` file for all this apps to force removing `old.domain.org`. I removed the default domain (`old.domain.org`) and cleared my browser cache. After that, I don't have any access to SSO (because my user is still under `old.domain.org`) and I don't have any access to the apps administration pages (because the nginx confs have been removed with `old.domain.org` directory).\r\n\r\nAfter that, I tried another thing : changing the domain option in `settings.yml`, moving all nginx configuration files from `/etc/nginx/conf.d/old.domain.org/` to `/etc/nginx/conf.d/new.domain.org/` and finally, removing `old.domain.org`. It's working better but there is still problems like accessing the apps administration pages with my user. On the access restriction for each app, I defined my user and after that, it's possible to reach the configuration pages.\r\n\r\nSo, it should be great to have one of this functionnality : \r\n\r\n* Possibility to change the domain for each app (before removing an old domain)\r\nor\r\n* If a domain is removed, moving all apps installed under this domain to the default one\r\n\r\nI think the behaviour of each app should differ when trying to change his domain. For that, it should be interesting to give the possibilty to have this option when building an app. So, at least for these apps, moving domain should be possible.\r\n\r\nQuite complicated, sorry for the amount of informations. I precise that I have worked on this apps : hotspot, piratebox, torclient and vpnclient\r\n\r\nThanks !!\r\n\r\n\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/YunoHost/moulinette-yunohost/issues/comments/132528149","html_url":"https://github.com/YunoHost/moulinette-yunohost/issues/71#issuecomment-132528149","issue_url":"https://api.github.com/repos/YunoHost/moulinette-yunohost/issues/71","id":132528149,"user":{"login":"gllm-","id":10120322,"avatar_url":"https://avatars.githubusercontent.com/u/10120322?v=3","gravatar_id":"","url":"https://api.github.com/users/gllm-","html_url":"https://github.com/gllm-","followers_url":"https://api.github.com/users/gllm-/followers","following_url":"https://api.github.com/users/gllm-/following{/other_user}","gists_url":"https://api.github.com/users/gllm-/gists{/gist_id}","starred_url":"https://api.github.com/users/gllm-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gllm-/subscriptions","organizations_url":"https://api.github.com/users/gllm-/orgs","repos_url":"https://api.github.com/users/gllm-/repos","events_url":"https://api.github.com/users/gllm-/events{/privacy}","received_events_url":"https://api.github.com/users/gllm-/received_events","type":"User","site_admin":false},"created_at":"2015-08-19T10:13:31Z","updated_at":"2015-08-19T10:13:31Z","body":"Hello,\r\n\r\nJust a little comment to say that I have exactly the same problem. I changed my domain name (actually just added a subdomain), for example from `domain.org` to `ynh.domain.org`.\r\n\r\nI have been able to set my new domain name in the administration page and set it as the default domain name. But all of my applications are still under my old domain name, so I can't access them.\r\n\r\nSo I approve this feature request.\r\n\r\nMany thanks !"}}