View previous topic :: View next topic |
Author |
Message |
machinelou Apprentice

Joined: 05 Apr 2003 Posts: 267
|
Posted: Wed Aug 16, 2006 3:17 pm Post subject: Apache doesn't know my hostname/domainname. [solved] |
|
|
I recently moved my mediawiki server to a second machine on my lan. Everything was working fine until today. When you edit a page in mediawiki, you can use hooks (they are kind of like HTML tags). For exampe, I use the hook {{server}} to insert my domainname like so:
Quote: | View [{{SERVER}}:/pics/piclist.html vacation pictures].<br> |
This creates a link to another page on the server. When accessing it from across the internet, the link appears in firefox as http://mydomain.dyndns.org:88/pics/piclist.html. As of this morning, mydomain.dyndns.org has been replaced by the machines lan ip (192.168.1.100). Thus, these links break when accessing the page from another network connection.
Now, compound that with what is probably a misuse of the hostname and domainname settings in /etc. My machine's hostname is saturn. I picked saturn because I think it's cool. However, my dyndns domain name is different. Let's say it's mydomain.dyndns.org. When I noticed this problem, I found a thread in this forum that said you could set the hosts domain name in /etc/conf.d/net. At the moment, mine reads like so:
Code: |
dns_domain_eth0="mydomain.gotdns.com"
dns_servers_eth0="68.105.161.20 68.1.18.30 68.11.16.30"
iface_eth0="192.168.1.101 broadcast 192.168.1.255 netmask 255.255.255.0"
gateway="eth0/192.168.1.1"
|
However, this still hasn't fixed the problem. Am I doing this right? Do I have to set hostname to mydomain.dyndns.com?
Last edited by machinelou on Thu Aug 17, 2006 1:44 pm; edited 1 time in total |
|
Back to top |
|
 |
nielchiano Veteran

Joined: 11 Nov 2003 Posts: 1287 Location: 50N 3E
|
Posted: Wed Aug 16, 2006 7:10 pm Post subject: |
|
|
You probabely run the DynDNS update-tool from your new server?
The problem is that your new server doesn't know your EXTERNAL IP address. He only knows his internal address.
The DynDNS tool is desiged to look up the computers IP, and send that to the servers. Since that tool finds your internal IP, your mydomain.dyndns.org account gets the wrong setting. It has nothing to do with the hostname or domainname settings of your server.
Try to move the dyndns-client to the machine that DOES know the external address. (probabely the router) |
|
Back to top |
|
 |
machinelou Apprentice

Joined: 05 Apr 2003 Posts: 267
|
Posted: Thu Aug 17, 2006 12:52 am Post subject: |
|
|
No, that's not the problem. My registered domain name with dyndns is being updated fine with the correct ip: when I type in my domainname into firefox from a different internet connection, it connects to my machine fine. The problem is that my machine (the new server) does not know its own domainname, such that, when mediawiki attempts to create links to itself, it uses the machine's local ip address instead of the registered domainname. I don't think this is a problem with mediawiki for the following reasons:
1) I have NOT updated mediawiki since weeks before the problem began.
2) I HAVE recently performed an emerge -uD world on the new server.
3) I don't know how to properly configure my machine to know its own domainname. Or at least, I am not confident that I know how. |
|
Back to top |
|
 |
nielchiano Veteran

Joined: 11 Nov 2003 Posts: 1287 Location: 50N 3E
|
Posted: Thu Aug 17, 2006 6:17 am Post subject: |
|
|
machinelou wrote: | My registered domain name with dyndns is being updated fine with the correct ip: when I type in my domainname into firefox from a different internet connection, it connects to my machine fine. The problem is that my machine (the new server) does not know its own domainname, such that, when mediawiki attempts to create links to itself, it uses the machine's local ip address instead of the registered domainname. |
Ok, that makes it clear...
You'll need to tell apache his hostname: edit /etc/apache/httpd.conf and look for "ServerName" |
|
Back to top |
|
 |
machinelou Apprentice

Joined: 05 Apr 2003 Posts: 267
|
Posted: Thu Aug 17, 2006 1:43 pm Post subject: |
|
|
Ah! Thanks, that worked great! I appreciate it very much |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|