Changing the way to access xwiki

Hello,

I use xwiki enterprise version 8.1 and it works fine.
I would like to change the way I access xwiki.
I usually access xwiki with the ip address of the server where xwiki was installed. I will now have access to my application thanks to a domain name for example: foo.xwiki.local.
I tried to do from my DNS server, I encountered a problem. In the server where xwiki is located, there is another application there but uses another port.
On the DNS side, a domain name has been associated with the server’s IP.

How could this problem be solved?

Regards,

Jovial N