Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using CentOS. When I try to start httpd I receive the following error:

> sudo httpd

httpd: apr_sockaddr_info_get() failed for ccrhwp01948
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

Here is the hostname information:

> hostname

samp-serv3

There is no domain associated with this server. Simply an IP address. Here is the host information:

> nano /etc/hosts

127.0.0.1   localhost localhost.localdomain  localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

Does anyone know how to properly fix this problem?

Thanks.

share|improve this question

migrated from stackoverflow.com Dec 27 '12 at 23:20

This question came from our site for professional and enthusiast programmers.

    
try issuing command "hostname samp-serv3" –  Ashish Mahamuni Dec 27 '12 at 19:10
add comment

2 Answers

set FQDN hostname

echo HOST.DOMAIN.com > /etc/hostname
/bin/hostname -F /etc/hostname
/etc/init.d/httpd restart
share|improve this answer
    
Should I do samp-serv3.IPHERE? There is no specific domain associated with the IP. –  Austin K Dec 28 '12 at 15:40
add comment

@Austin K - No, you need FQDN hostname like samp-serv3.example.com and put that entry in /etc/hosts file related to your IP address.

share|improve this answer
    
I do not have a domain associated with the IP address though. What should I do? –  Austin K Dec 28 '12 at 18:39
    
Then associate with 127.0.0.1 just put that entry in /etc/hosts file and add hostname in /etc/hostname file –  user156944 Dec 28 '12 at 19:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.