# Requests through Apache show as from Localhost

**URL:** <https://www.ruby-forum.com/t/requests-through-apache-show-as-from-localhost/119635>\
**Category:** Deployment\
**Created:** [November 8, 2007, 7:45pm UTC](https://www.ruby-forum.com/t/requests-through-apache-show-as-from-localhost/119635 "2007-11-08T19:45:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![supasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ebca7d/32.png) [@supasta](https://www.ruby-forum.com/u/supasta)\
**Post date:** [November 8, 2007, 7:45pm UTC](https://www.ruby-forum.com/t/requests-through-apache-show-as-from-localhost/119635/1 "2007-11-08T19:45:31Z")

</div>

Does anyone know of a recent change in the way Rails or Mongrel handles  
headers?

After the following updates:

Rails updated to 1.2.5  
Mongrel updated to 1.1

All log files show as the following no matter the host they come from:

Processing UserController#login (for 127.0.0.1 at 2007-11-08 12:38:24)  
[GET]

The site runs through Apache 2.2 load balancer, and no configuration  
changes have been made to Apache.

Chris

---

<div class="post-metadata">

**Author:** ![supasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ebca7d/32.png) [@supasta](https://www.ruby-forum.com/u/supasta)\
**Post date:** [November 18, 2007, 5:24pm UTC](https://www.ruby-forum.com/t/requests-through-apache-show-as-from-localhost/119635/2 "2007-11-18T17:24:42Z")

</div>

Changed line 105 of

/usr/lib/ruby/gems/1.8/gems/actionpack-1.13.5/lib/action\_controller/request.rb

from

- ip =~ /^unknown$|^(10|172.(1[6-9]|2[0-9]|30|31)|192.168)./i

- ip =~ /^unknown$|^(10|172.(1[6-9]|2[0-9]|30|31))./i

Chris W. wrote:

> Does anyone know of a recent change in the way Rails or Mongrel handles  
> headers?
> 
> After the following updates:
> 
> Rails updated to 1.2.5  
> Mongrel updated to 1.1
> 
> All log files show as the following no matter the host they come from:
> 
> Processing UserController#login (for 127.0.0.1 at 2007-11-08 12:38:24)  
> [GET]
> 
> The site runs through Apache 2.2 load balancer, and no configuration  
> changes have been made to Apache.
> 
> Chris

---

<div class="post-metadata">

**Author:** ![supasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ebca7d/32.png) [@supasta](https://www.ruby-forum.com/u/supasta)\
**Post date:** [December 3, 2007, 10:13pm UTC](https://www.ruby-forum.com/t/requests-through-apache-show-as-from-localhost/119635/3 "2007-12-03T22:13:12Z")

</div>

I found similar problem when upgrading to Rails 1.2.6. Why did the  
change below work for you? I tried it without success. For some reason  
it only seems to be affecting one application, and the problem showed  
up after the log was rotated.

On Nov 18, 10:24 am, Chris W. \<ruby-forum-incom…@andreas-

---

<div class="post-metadata">

**Author:** ![supasta](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ebca7d/32.png) [@supasta](https://www.ruby-forum.com/u/supasta)\
**Post date:** [November 22, 2007, 8:11am UTC](https://www.ruby-forum.com/t/requests-through-apache-show-as-from-localhost/119635/4 "2007-11-22T08:11:32Z")

</div>

This must be a bug in rails, right? Did you report it?

On Nov 18, 5:24 pm, Chris W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
