Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Today while trying to start apache server I received an error:

Apr_sockaddr_info_get() Failed

I would like to get opinions / answers to resolve this issue.

I would like to know what exactly is wrong with my current setup and what are correct steps I need to take to resolve it.

Just to start apache server I referred to http://www.webune.com/forums/apr-sockaddr-info-get-failed.html and server started without error but I don't see website coming online yet.

I'm not exactly sure what all information is required to resolve it, you guys can ask me and I'll reply with required information

share|improve this question
    
is your ServerName defined in your httpd.conf? –  organicit May 1 '12 at 2:33

2 Answers 2

just try the following steps:

sudo nano /etc/apache2/httpd.conf 

Most probably the file will be empty.

Just add the following line, and you are done!

ServerName localhost 

[ localhost will be the servername. ]

Then you can restart service by typing the code below:

sudo service apache2 restart
share|improve this answer

Fix your hosts file at /etc/hosts.

1) From command line type hostname to get your hostname. Example output might be example.com

2) Edit /etc/hosts and change the lines to match your hostname. Example:

    ::1 localhost.example.com localhost
    127.0.0.1 localhost.example.com localhost
    192.168.1.104 example.com example
    192.168.1.104 example.com.

3) Open your httpd.conf file and make sure ServerName is defined. If it is not add ServerName example.com

4) Restart apache via command line apachectl -k graceful OR apachectl -k restart

share|improve this answer
    
For multiple domains, would you simply add in the other sites to the hosts file? –  Mat-visual Jan 27 at 6:59
    
@Mat-visual yes, as many as you like. –  Anthony Hatzopoulos Jan 27 at 17:27

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.