Topic on Project:Support desk

web address changes to IP address when accessing MW server

6
Phaseform (talkcontribs)

I have a MW server running locally on port 85, to get to this I have a subdomain which does a redirect to my local WAN IP and the associated port (just HTTP forward to http://IP:PORT ). Only trouble is when I load the web address, it changes from the subdomain to IP:PORT. I've tried modifying $wgServer in LocalSettings.php for MW and ServerName in httpd.conf for the associated apache server to no avail. Also I've tried a bunch of different combinations such as forwarding to http://IP:PORT/mediawiki/index.php etc.

This solution on stack overflow suggests Apache Module mod_proxy, but I'm not sure if I need this, and I'm hesitant possibly opening more doors to the internet without knowing what can happen.

Phaseform

88.130.77.183 (talkcontribs)

Hi!

Do I understand this correctly? You say that when you call the subdomain and hit enter, then you get a call to the IP address instead?

If this is the case, then it is not $wgServer, which would be set incorrectly. $wgServer "only" influences how MediaWiki builds the URLs, which it creates. When these URLs still point to the subdomain (and not to the IP address), then $wgServer is set correctly (or at least not wrong in a way that it would point to the IP address).

58.96.109.120 (talkcontribs)

Thankyou that clarifies a lot, but I still can't find what is set incorrectly, I've been through like every setting on the domain provider web settings. Still not sure which component is at fault.

Florianschmidtwelzow (talkcontribs)

> does a redirect to my local WAN IP

Really a redirect? Then there is your problem. You need to set a resource record (A (IPv4) and AAAA (IPv6) normally) to point to your IP-Adress where the server runs behind.

Notice: Please think about, if a local hosting of a webserver is the correct way to provide internet services :)

Phaseform (talkcontribs)

finding out about DNS records just made my day. now I need my local servers to set a subdomain to a port. I have a very small amount of traffic in so I'm not overly concerned about my meager up speed :)

Florianschmidtwelzow (talkcontribs)

This was the solution? :)

> to set a subdomain to a port

That's impossible. DNS records always points to an IP adress (at least A and AAAA records). On what port the user can reach what service is configured on the server behind the IP address :)

Reply to "web address changes to IP address when accessing MW server"