Tokyoahead

News
News
Architecture
Architecture
Asian Cooking
Asian Cooking
Finance
Finance
Galapagos
Galapagos
Technology
Technology
Trips & Sights
Trips & Sights
  

I have "sh: host: command not found" in my logfiles!

If you get a
sh: host: command not found
or similar in your servers logfile you have a program that tries to execute the "host" command but either cannot find it or is not allowed to execute it.

This typically comes from a tatistics software or similar because the host-command is used to get a hostname for an ip address (such as google.com etc).

to remove this entry, you have to 1st find if you have the host command installed on your server. also, see if you are using bind instead, then you need a different host program, please refer to your distribution what is needed. This becomes clear once you install "host" and get a different error.

If you have host installed, and the error still comes up, this means that the script on your server (php?) is not allowed to execute shell commands such as host. Please note that even if the command is executed from one of your -servers, the error will not show up in the corresponding logfile, but in the common default errorlog of apache.

So you will have to find out from which virtualhost this comes. you can search for "host" in the scripts or if the servers are not critical, disable each virtualhost for some time to see which one is causing the trouble. Alternatively you can also allow the script to execute shell commands, which is not recommendable for security reasons. Remember its most probably a statsistics software trying to access the command.

Last Update: 2008-01-10 09:13:35
 FAQ > Server Software  > Apache Webserver