Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

httpd service - alert message 1

Status
Not open for further replies.

aixlurker

Technical User
Jun 20, 2002
39
PH
hi,

i have just setup a redhat 7.3 box. during installation, i have given the hostname. everytime the httpd service is started/restarted i got the alert message " httpd: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName.

what shall i do for the service to use the ip address or the hostname and not the loopback?

how to make this computer join to an existing domain hosted by an NT server?

thankx for your help....
 
1. Add your hostname and domain to the /etc/hosts file.

/etc/hosts -->
127.0.0.1 localhost.localdomain localhost
192.168.1.11 www

Do not remove the loopback line.


2. To join a Windoze domain, create a computer account in the domain in Server Manager (Windows), using the Linux boxes hostname. Next, join the domain from the Linux box like this...

smbpasswd -j 'domainname' -r 'netbios_name_of_pdc'


ChrisP
------------------------------------------------------------------------------
If somebody helps you, please click the link in the botton left hand corner that says "Mark this post as a helpful/expert post".
 
hi,
i added this at the /etc/hosts file:
192.200.10.2 redhat.my_intranet redhat

i then restart the xinetd and httpd daemon. still, the httpd restarted with the same message.

did i added it wrong? my_intranet is my workgroup/domain name.

thanks for your help...
 
I forgot to add that if you want the hostname changes to survive a reboot, you must edit the /etc/sysconfig/network file.


Are you running Apache as your web server? If you are, look for the "ServerName" directive.


Actually, you might want to change /etc/hosts to look like this...

127.0.0.1 localhost redhat.my_intranet redhat
192.200.10.2 redhat.my_intranet redhat


ChrisP
------------------------------------------------------------------------------
If somebody helps you, please click the link in the botton left hand corner that says "Mark this post as a helpful/expert post".
 
Nevermind that last comment about the /etc/hosts file. Just leave it as I said to in the first post. My mistake, there is no need to do that at this point. Lets figure out what name 'httpd' is trying to resolve first, and then we'll go from there. ------------------------------------------------------------------------------
If somebody helps you, please click the link in the botton left hand corner that says "Mark this post as a helpful/expert post".
 
thanks fluid, the ServerName directive works. anyway, i am new to networking but i have 4 PC's here interconnected. One runs on linux and one on win2000 server while the other 2 PCS runs on win98 and win2000 pro.
What are these DNS and Name Server? Can you give me a practical example when to use them and why use them? With my setup now (workgoup only), do i need them?

thanks for sharing your valuable ideas...
 
DNS is Domain Name System. A name server is another name for a DNS server. DNS is used to resolve hostnames to IP addresses. You probably don't need a DNS server on your network, unless you are running some special services that need name resolution. Linux's DNS software is called BIND and can be downloaded here -->
The /etc/hosts file that we edited earlier is used for name resolution. Your Linux server needs to know that 'localhost' is using IP address 127.0.0.1. When you visit your computer uses a DNS server to resolve that name to an IP address.


ChrisP ------------------------------------------------------------------------------
If somebody helps you, please click the link in the botton left hand corner that says "Mark this post as a helpful/expert post".
 
does it mean taht, name server refers to the computername that runs the DNS service and that DNS and /etc/hosts served the same purpose? In the /etc/hosts file, what is the format for the entries? Obviously, the first column is the ip address. what about the redhat.my_redhat redhat?
 
Yes, name servers are the same thing as DNS servers.

The /etc/hosts file and DNS serve the same purpose. DNS is used to overcome the limitations of hosts files. Its impossible to have every computer on the internet with the same hosts file that lists every computer on the internet. Thats where DNS comes in. Do a google search on DNS and you can find hundreds of explanations on it. Its not something I can teach you in this forum. Here's a good doc on DNS....



ChrisP

------------------------------------------------------------------------------
If somebody helps you, please click the link in the botton left hand corner that says "Mark this post as a helpful/expert post".
 
About the format of the /etc/hosts file, the second column is the host + domain and the third column is the host. //Daniel
 
There isnt' a second and third column, the way you are talking about it. You put the IP address, and then anything that you want to resolve to that IP. It can be a FQDN (fully qualified domain name) or just a single hostname without a domain. You can have as many as you want. The syntax is this...

IP_address canonical_hostname aliases

Read the man page, it explains it very well, better than I just attempted to:). Just type 'man hosts'.


ChrisP


------------------------------------------------------------------------------
If somebody helps you, please click the link in the botton left hand corner that says "Mark this post as a helpful/expert post".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top