Error "not found or unable to stat" in apache logs, and difference in httpd.conf and site Document Roots

The DocumentRoot in httpd.conf is likely to be the default for any hosts not handled by a virtual host. For example, requests on the IP address.

You could set the DocumentRoot to be the same as the default site (if that's what you want for requests to the IP address), or you use a RewriteRule to rewrite the request back to the main site either in the httpd.conf or in the .htaccess file:

<Directory /var/www/html>  
    RewriteRule wp-cron.php http://yourdomainname.com/wp-cron.php [R=301]  
</Directory>

Without knowing what the script is, or if it exists elsewhere, it's not easy to advise. A symlink could also fix it, but permissions might get in your way.


Found the answer; problem was hosts entries: Hosts file entries for multiple domains on VPS?