I have a web app that listens on 443 and 444 via apache, I need to know in my rails app which port the request came from. I think something with the RequestHeader directive is required, but not sure how to do it... any ideas ??? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
uncle
2007-Jul-25 19:28 UTC
Re: original port from apache needed in rails ? RequestHeader ?
found it...you can add this to your apache config...
#===== server port
RewriteCond %{SERVER_PORT} (.*)
RewriteRule .* - [E=X_SERVER_PORT:%1]
RequestHeader add HTTP_X_SERVER_PORT %{X_SERVER_PORT}e
must have apache 2.2 or better
mongrel (or whatever) will see a new header HTTP_X_SERVER_PORT
On Jul 25, 12:21 pm, uncle
<akt...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> I have a web app that listens on 443 and 444 via apache, I need to
> know in my rails app which port the request came from. I think
> something with the RequestHeader directive is required, but not sure
> how to do it...
>
> any ideas ???
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---