apache2: apr_sockaddr_info_get() failed for somehost
Hypothetically speaking of course, let’s assume you forget to renew a domain name. And suddenly that domain’s email is not working. And then you notice the site is down. The next step is, logically speaking, to panic, followed by an attempt to figure out what the hell is going on. Which usually means restarting Apache. Which results in:
apache2: apr_sockaddr_info_get() failed for yourhost
Which is, wow, an exotic new error. If you see this it means that, even though Apache says its restarting, really its probably not. And now all your other sites are down. And, so, more panic. More panic for you.
Now that you’ve probably realized that the default domain name has expired, you will want to get Apache back up on a different, actually non-expired domain. Like this:
$ hostname actual-non-expired-domain-name.com
Now restart.
Alternatively if your hostname is set to something like “www”, probably you can change the default site in vhosts so that Apache can connect the hostname to the tld.
This is all hypothetical of course.

August 21st, 2008 at 10:06 am
Hehe, this made my day. Thanks.
September 23rd, 2008 at 9:32 am
set hostname as you wish in /etc/conf.d/hostname
HOSTNAME=” ,
and add to /etc/apache2/httpd.conf
# server name
NameServer
don’t forget to include this name also in /etc/hosts
it works great for me
December 19th, 2008 at 2:31 pm
Nice !!!!
Thanks !
June 9th, 2009 at 12:45 pm
Thanx!
(had to append current hostname to “/etc/hosts”)
June 3rd, 2011 at 1:14 pm
Thank you!
November 17th, 2011 at 2:20 pm
software de mantenimiento…
[...]apache2: apr_sockaddr_info_get() failed for somehost | blog.arithm[...]…
December 2nd, 2011 at 6:23 pm
maybe turn on “HostnameLookups” in apache2.conf ?