Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

HTTP_HOST errors in Apache log during log rotation


Reply

1620 Views

Avatar
3dkiwi

8 March 2008 at 1:09pm (Last edited: 8 March 2008 1:10pm), Community Member, 17 Posts

Guys

Trickier one this time...

I rotate my Apache Logs nightly and this causes the Apache2 server to send some test requests to itself.

xxx.xxx.xxx.xxx - - [07/Mar/2008:xx:09:24 +1300] "GET / HTTP/1.0" 200 2382 "-" "Apache/2.2.4 (Linux/SUSE) (internal dummy connection)"
xxx.xxx.xxx.xxx - - [07/Mar/2008:xx:09:24 +1300] "GET / HTTP/1.0" 200 2382 "-" "Apache/2.2.4 (Linux/SUSE) (internal dummy connection)"
...

But when this happens I get the following in the Apache error_log

[Fri Mar 07 xx:09:24 2008] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Undefined index: HTTP_HOST in xxx/sapphire/core/control/Director.php on line 482
[Fri Mar 07 xx:09:24 2008] [error] [client xxx.xxx.xxx.xxx] PHP Notice: Undefined index: HTTP_HOST in xxx/sapphire/core/control/Director.php on line 487
...

When I installed this instance of SS I removed the Dev server entries 127.0.0.1 and localhost as suggested when running a live site so my _config.php has the following entry.

// Sites running on the following servers will be
// run in development mode. See
// http://doc.silverstripe.com/doku.php?id=devmode
// for a description of what dev mode does.
Director::set_dev_servers(array(
'',
));

Is this a bug or do I have some other configuration wrong?

3d