unable to resolve host – not found or unable to stat

Debian 7 Apache 2.2.22

Virtualhost with only one website using ssl – ssl certificate is for www.example.com (not example.com)

The following setup resolves the “unable to resolve host” error

/etc/hosts

127.0.0.1 localhost
{server ip address} www.example.com www

/etc/hostname

www.example.com

However, if you have a new apache error

[error] [client 127.0.0.1] script ‘/var/www/wp-cron.php’ not found or unable to stat

Change hosts to

/etc/hosts

127.0.0.1 localhost
127.0.1.1 example.com
45.145.145.145 www.example.com www

Error messages should be gone

You may also like...