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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

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

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

HTTP_HOST errors in Apache log during log rotation


Go to End


2142 Views

Avatar
3dkiwi

Community Member, 18 Posts

8 March 2008 at 1:09pm

Edited: 08/03/2008 1:10pm

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