Manual:$wgServerName

Details
The name of the server without the protocol or trailing slash. (eg, "en.wikipedia.org"). See $wgServer for details about how it is calculated.

The syntax to get a website to answer on an IP is: