Apache error log: error: client 127.0.0.1: File does not exist: /htdocs

From Bitbull Wiki
Jump to navigation Jump to search

these days i found on my apache error_log this message:

[Sun Jan 10 23:39:38 2010] [error] [client 127.0.0.1] File does not exist: /htdocs

again and again, i never found the /htdocs dir in my config because i use html dir
for all my virtual apache hosts.
i nearly freaked out, then i got this hint on the net:
it is because 127.0.0.1 has no virtual hosts.... why that?

because i had this base config for my virtual apache domains:

NameVirtualHost *:80

this means also 127.0.0.1 and of course i have no virtual hosts configured for loopback interface! :)
that is the reason for the strange error_log message.

the solution is simple:

vi /etc/httpd/conf/httpd.conf
---
DocumentRoot "/home/www/bitbull/html"
---

or

vi /etc/httpd/conf/httpd.conf
---
NameVirtualHost 1.2.3.4:80
---