Fix url generation in functional and acceptance tests

Fix for #4608

Also can fix other issues with a port lack in a absolute url.
remove "frontend" and add "backend"?
it's ok?