Forum Moderators: phranque

Message Too Old, No Replies

"localhost" is always replace by the local IP-address

         

haemi

7:42 am on Aug 9, 2005 (gmt 0)

10+ Year Member



For example, if I type "http://localhost/forum/" into the address field of the browser, the forum is loaded as expected.

But all links appear as "http://10.84.0.16/forum/whatever" - 10.84.0.16 is the server's internal IP-address. In the network itself this would not be a problem. But as soon as I try to access the forum through the internet, it doesn't work any more: The first loading is successful, but again, all links appear as "http://10.84..." - and this leads to errors, of course.

What am I doing wrong?

Thanks for your help!

bird

7:51 am on Aug 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In your server configuration, you probably have the following line:

ServerName 10.84.0.16

instead of this:

ServerName www.example.com

haemi

8:12 am on Aug 9, 2005 (gmt 0)

10+ Year Member



No... there's

ServerName localhost

bird

9:48 am on Aug 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



And how is that supposed to make any sense from outside of your local machine?

bird

11:23 am on Aug 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



To make that sound less negative: The ServerName must of course be the domain under which the site can reached from the outside. "Localhost" is to be taken literally, it is alway the local machine (ie. my own box, were I to visit your forum).

haemi

8:56 pm on Aug 9, 2005 (gmt 0)

10+ Year Member



okay... localhost does not make sense then...

but if i change it to the external ip-address, it doesn't work either... :(

ChadSEO

9:34 pm on Aug 9, 2005 (gmt 0)

10+ Year Member



Is there a configuration option in your forum software that specifies the website it resides on. On most that I've used, you can specify the URL as "http://www.example.com/forum/" or something. It could be using this address.