Problem with URL on local installation

Hello,
I have a gitlab-ee instance installed on my QNAP.
I have a problem though. Every time I go to the issues board and click the issue to see details, it wants to open a page:

http://gitlab-ee/project-name/…

instead of

http://ip-address:port/project-name/…

or

http://qnap-name:port/project-name/…

This is very inconvienient. What can I do to fix this?