Hmm, initially The setup looks good, but where does the www. part come from? Are you running apache in front - or is the site doing some kind of redirection?
The following url http://mysite.se/portal/master/mysite should then give you the errorpage for the target site, as the actual path queried will be /portal/master/mysite/portal/master/mysite.
Please test this both with and without the “admin” record (to see if something is different when it is removed).
Removing the admin part makes no difference. Actually its my-site instead og mysite if it makes any difference.
Whit the config hitting http://my-site.se/portal/master/my-site takes me to the my real site and not the error page.
Hmm… is this a dummy domain or an actual domain? my-site.se actually exists… I was assuming this was a test-domain. Maybe you can share the settings of your /etc/hosts file?
So if you are able to access without error to “mysite.se/portal/master/mysite” or that you are redirected from “mysite.se/” to “mysite.se/admin/tool” it is because the virtual host mapping is not set as you guessed.
I will list below some causes that I think about:
1 - The line "enabled = true” has to be uncommented
2 - The mappings can be overridden if you used the same mapping name. Make sure it is not the case
No I think you are fine. I just missed the part that /home/xp/enonic/xp/ is my new $XP_HOME and I have to edit the vhost in there. I was editing the vhost in /opt/enonic/...
sudo cp -R /opt/enonic/xp/home/* /home/xp/enonic/xp/
sudo chown -R xp:xp /home/xp/enonic