IP in Lucee is always 127.0.0.1 (forward from Apache)...

386 views
Skip to first unread message

Brad

unread,
Aug 22, 2015, 5:42:13 PM8/22/15
to Lucee
I thought ProxyPreserveHost On would allow Lucee to see the original IP but CGI.REMOTE_ADDR is always 127.0.0.1...  Is there a way to do what I want or?

<IfModule mod_proxy.c>
    <Proxy *>
    Allow from 127.0.0.1
    </Proxy>
    ProxyPreserveHost On
    ProxyPassMatch ^/(.+\.cf[cm])(/.*)?$ http://127.0.0.1:8888/$1$2
    ProxyPassMatch ^/(.+\.cfchart)(/.*)?$ http://127.0.0.1:8888/$1$2
    ProxyPassMatch ^/(.+\.cfml)(/.*)?$ http://127.0.0.1:8888/$1$2
    # optional mappings
    #ProxyPassMatch ^/flex2gateway/(.*)$ http://127.0.0.1:8888/flex2gateway/$1
    #ProxyPassMatch ^/messagebroker/(.*)$ http://127.0.0.1:8888/messagebroker/$1
    #ProxyPassMatch ^/flashservices/gateway(.*)$ http://127.0.0.1:8888/flashservices/gateway$1
    #ProxyPassMatch ^/openamf/gateway/(.*)$ http://127.0.0.1:8888/openamf/gateway/$1
    #ProxyPassMatch ^/rest/(.*)$ http://127.0.0.1:8888/rest/$1
    ProxyPassReverse / http://127.0.0.1:8888/
</IfModule>

Tom Chiverton

unread,
Aug 24, 2015, 4:33:06 AM8/24/15
to Lucee
Based on https://groups.google.com/d/msg/railo/U9TSv3L4j94/ASz-2JQD29wJ in ...tomcat/conf/web.xml add

<filter>
  <filter-name>RemoteIpFilter</filter-name>
  <filter-class>org.apache.catalina.filters.RemoteIpFilter</filter-class>
</filter>

<filter-mapping>
  <filter-name>RemoteIpFilter</filter-name>
  <url-pattern>/*</url-pattern>
  <dispatcher>REQUEST</dispatcher>
</filter-mapping>

Brad

unread,
Aug 24, 2015, 8:34:47 AM8/24/15
to Lucee
Thanks a ton, I did search, not sure how I missed that...

Tom Chiverton

unread,
Aug 24, 2015, 8:54:28 AM8/24/15
to lu...@googlegroups.com
I've no idea why this isn't the default setup to be honest !

--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/iWWu_n8nTM4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/81279df0-e836-4f19-9742-932572894495%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Tom

Jordan Michaels

unread,
Aug 25, 2015, 3:30:42 PM8/25/15
to lu...@googlegroups.com
> I've no idea why this isn't the default setup to be honest !

https://github.com/utdream/CFML-Installers/issues/59

Time. Create the screen, write the scripts, debug in multiple environments...

many hours...

-Jordan
> <https://groups.google.com/d/msgid/lucee/81279df0-e836-4f19-9742-932572894495%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



--
Tom

--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAKS-b5ufubHW6wYCzfMmD2s-rtPOhrZKdjT8cNZ1-9%2BMSdSTyA%40mail.gmail.com.

Tom Chiverton

unread,
Aug 26, 2015, 6:29:02 AM8/26/15
to lu...@googlegroups.com
Start out by making it non-optional. Almost everyone will want it.


For more options, visit https://groups.google.com/d/optout.



--
Tom
Reply all
Reply to author
Forward
0 new messages