Probems with network and some dns too, I think

Discuss Networking
User avatar
Basher52
guru
guru
Posts: 922
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Post by Basher52 » Fri Jan 23, 2009 2:00 am

another thing
my prompt looks something like this:

Code: Select all

[root@v-603-kalvb-82-112-21 ~]#
and that is a name given to the server by my ISP.
so, if I get real DNS name fixed and point it to this IP, will this name change?
or should I manually set it to the same as the site name?
or won't this matter at all?

how can I explain this...
The: 'v-603-kalvb-82-112-21' is the name of the server, right?
but I want that to be the same as site name, is that possible?
let's say the site name is: www.site.se and that is a registered name.
Just by pointing that name to the servers IP the name won't change, right?
since the server will still "sit" behind my ISP.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Fri Jan 23, 2009 10:37 am

You generally don't want your hostname set to your provider's DNS entry for the dynamic address you get from them. Do you have the "HOSTNAME" var set to what you want in /etc/sysconfig/network? It should be set to something other than "localhost". It doesn't really matter what is though but you should also have an entry for whatever it is in /etc/hosts. If you don't have a static address at all on the box you can just add the name to the 127.0.0.1 line (don't change the line, just add the name to the end).

User avatar
Basher52
guru
guru
Posts: 922
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Post by Basher52 » Fri Jan 23, 2009 11:39 am

HOSTNAME is empty (HOSTNAME=) and I don't know what to set it to since this server is gonna have two sites on it with different DNS names.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Fri Jan 23, 2009 12:03 pm

It doesn't matter what you set it to. Call it "mywebserver" if nothing else.

User avatar
Basher52
guru
guru
Posts: 922
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Post by Basher52 » Fri Jan 23, 2009 1:04 pm

OK got it
(another toaster in the mail :P)

User avatar
Basher52
guru
guru
Posts: 922
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Post by Basher52 » Sat Jan 24, 2009 1:24 pm

well this sure did a nasty thing lol
httpd didn't start after I changed it. I changed it yesterday but it didn't show until I powered the server up just now.

this is what I got the the /var/log/httpd/error.log

Code: Select all

...
[Fri Jan 23 11:19:35 2009] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Fri Jan 23 11:19:35 2009] [notice] mod_python: using mutex_directory /tmp
[Fri Jan 23 11:19:35 2009] [notice] Apache/2.2.10 (Unix) DAV/2 PHP/5.2.6 mod_python/3.3.1 Python/2.5.2 mod_ssl/2.2.10 OpenSSL/0.9.8g Apache/2.2.0 (Fedora) mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations
[Sat Jan 24 00:33:13 2009] [notice] caught SIGTERM, shutting down
[Sat Jan 24 17:55:17 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Jan 24 17:55:17 2009] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "webserver"
Configuration Failed
[Sat Jan 24 20:16:14 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Jan 24 20:16:19 2009] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "webserver"
Configuration Failed
[Sat Jan 24 20:16:23 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Jan 24 20:16:23 2009] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "webserver"
Configuration Failed
[Sat Jan 24 20:16:25 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Jan 24 20:16:25 2009] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "webserver"
Configuration Failed
[Sat Jan 24 20:17:39 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Jan 24 20:17:39 2009] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "webserver"
Configuration Failed
[Sat Jan 24 20:17:40 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Jan 24 20:17:40 2009] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "webserver"
Configuration Failed
[Sat Jan 24 20:18:24 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Jan 24 20:18:24 2009] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "webserver"
Configuration Failed
[Sat Jan 24 20:18:25 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Jan 24 20:18:25 2009] [alert] (EAI 2)Name or service not known: mod_unique_id: unable to find IPv4 address of "webserver"
Configuration Failed
[Sat Jan 24 20:20:34 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Jan 24 20:20:35 2009] [notice] ModSecurity for Apache/2.5.7 (http://www.modsecurity.org/) configured.
[Sat Jan 24 20:20:35 2009] [notice] Original server signature: Apache/2.2.10 (Fedora)
[Sat Jan 24 20:20:35 2009] [notice] Digest: generating secret for digest authentication ...
[Sat Jan 24 20:20:35 2009] [notice] Digest: done
[Sat Jan 24 20:20:38 2009] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Sat Jan 24 20:20:38 2009] [notice] mod_python: using mutex_directory /tmp
[Sat Jan 24 20:20:39 2009] [notice] Apache/2.2.10 (Unix) DAV/2 PHP/5.2.6 mod_python/3.3.1 Python/2.5.2 mod_ssl/2.2.10 OpenSSL/0.9.8g Apache/2.2.0 (Fedora) mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations

The last part is from when I removed the name of the HOSTNAME
I just removed it to what it was: 'HOSTNAME=' and it started to work.

I first removed it and restarted both the network and httpd but that didn't help so I restarted the hole server and that helped, but know when writing this, I forgot about the NetworkManager again lol in case that made me to reboot the hole thing.


When you told me about this... hehe... were you trying to make a joke?
j/k

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sat Jan 24, 2009 1:34 pm

Did you also add the name to /etc/hosts like I said?

User avatar
Basher52
guru
guru
Posts: 922
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Post by Basher52 » Sat Jan 24, 2009 1:49 pm

oh crap, you just have to be right don't ya :P
forgot that, but I really don't get what you said there:
If you don't have a static address at all on the box you can just add the name to the 127.0.0.1 line (don't change the line, just add the name to the end).
"Don't change the line, just add the name to the end"
If I'm not supposed to change the line how can add the name to the end :P
or am I too "blond" (but I'm not though)

Code: Select all

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain   localhost
::1     localhost.localdomain   localhost6      localhost       xxxx    xx-yyyy

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sat Jan 24, 2009 2:12 pm

Make the 127.0.0.1 line look like:

Code: Select all

127.0.0.1       localhost.localdomain localhost mywebserver
Or whatever you named it. The local hostname should be associated with a static address (the loopback address (127.0.0.1) if you don't have any other static address).

User avatar
Basher52
guru
guru
Posts: 922
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Post by Basher52 » Sat Jan 24, 2009 3:41 pm

The IP is not a "true" static IP address no, but they don't change it much and since the server is gonna be online 24/7, I think the next new IP is gonne be like a year from now :)

Oh so THAT what you meant by adding it, DOH! lol
But I kinda don't get that 'add', how will that "make" the site be called "mywebserver"?, since it's also called localhost and that word is first too

But I'll try it :)

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sat Jan 24, 2009 4:25 pm

That's just your local hostname. You may also have many names for that server in DNS for your virtual hosts. This site (voidmain.is-a-geek.net) runs on a server with a local name of "nitro". I also have a non-public DNS entry for it with that name. In addition to voidmain.is-a-geek.net there are several other virtual hosts on this server with their own DNS names. The server actually sits behind a firewall and has a private static IP address which I have the local hostname associated with (the private DNS entry is also ssociated with that private address).

User avatar
Basher52
guru
guru
Posts: 922
Joined: Wed Oct 22, 2003 5:57 am
Location: .SE

Post by Basher52 » Sat Jan 24, 2009 4:32 pm

hmm... I think I got that
I'll do what you say cos I think you're right but haven't thought of that.
it's SOOOOO natural to think of that for a normal Linux nurd, but I'm not there yet :( but hope to be soon

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sat Jan 24, 2009 4:49 pm

Well, it's not just Linux. All *NIX systems are like that. In fact Windows even has a hosts file and a local host name. See this for more info:

http://movealong.org/hostname.html

Post Reply