Getting cgi.REDIRECT_* variables when using mod_cfml

Hi All,

I know this is something that has come up before, however I’ve just come
across it again and was wondering if anyone ever managed to solve it.

When using mod_cfml as a connector between Apache and Tomcat some of the
cgi variables, particular the REDIRCET_* variables go missing, for example
cgi.REDIRECT_URL. An example of when this variable would normally exist is
when using the ErrorDocument directive in Apache, for example:

ErrorDocument 404 /404.cfm

and then in 404.cfm you could access the original URL, e.g. /this_new_page
from the cgi.REDIRECT_URL variable. Using mod_jk you can add in some
JkSetEnv to pass them through, however in this case the server is already
configured using mod_cfml, with many sites already on it and we can’t
really change to using mod_jk at this point.

Is there something similar to the JkSetEnv that can be done with mod_cfml
to pass these variables across to Tomcat / Lucee?

Thanks.

Kind regards,

Andrew

If it was me I wouldn’t use mod_cfml in production had two many instances
of wrong context being shown randomly.

But are you sure this is related to mod_cfml if u manually determine your
host config in server. XMLdoes it make a difference?

ASent from my phone
On 7 Feb 2015 10:21, “Andrew Dixon” <@Andrew_Dixon> wrote:

Hi All,

I know this is something that has come up before, however I’ve just come
across it again and was wondering if anyone ever managed to solve it.

When using mod_cfml as a connector between Apache and Tomcat some of the
cgi variables, particular the REDIRCET_* variables go missing, for example
cgi.REDIRECT_URL. An example of when this variable would normally exist is
when using the ErrorDocument directive in Apache, for example:

ErrorDocument 404 /404.cfm

and then in 404.cfm you could access the original URL, e.g. /this_new_page
from the cgi.REDIRECT_URL variable. Using mod_jk you can add in some
JkSetEnv to pass them through, however in this case the server is already
configured using mod_cfml, with many sites already on it and we can’t
really change to using mod_jk at this point.

Is there something similar to the JkSetEnv that can be done with mod_cfml
to pass these variables across to Tomcat / Lucee?

Thanks.

Kind regards,

Andrew
http://about.me/andrew_dixon


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

Not really had any issues with the wrong context being shown and it does
mean you can add new context’s without having to restart, unless there is a
way to do this with mod_jk that I’m not aware of.

Hmmm… good point, will give that a try on my dev machine and see what
happens.

Kind regards,

Andrew
http://about.me/andrew_dixonOn 7 February 2015 at 10:32, Alex Skinner <@Alex_Skinner> wrote:

If it was me I wouldn’t use mod_cfml in production had two many instances
of wrong context being shown randomly.

But are you sure this is related to mod_cfml if u manually determine your
host config in server. XMLdoes it make a difference?

A

Sent from my phone
On 7 Feb 2015 10:21, “Andrew Dixon” <@Andrew_Dixon> wrote:

Hi All,

I know this is something that has come up before, however I’ve just come
across it again and was wondering if anyone ever managed to solve it.

When using mod_cfml as a connector between Apache and Tomcat some of the
cgi variables, particular the REDIRCET_* variables go missing, for example
cgi.REDIRECT_URL. An example of when this variable would normally exist is
when using the ErrorDocument directive in Apache, for example:

ErrorDocument 404 /404.cfm

and then in 404.cfm you could access the original URL, e.g.
/this_new_page from the cgi.REDIRECT_URL variable. Using mod_jk you can add
in some JkSetEnv to pass them through, however in this case the server is
already configured using mod_cfml, with many sites already on it and we
can’t really change to using mod_jk at this point.

Is there something similar to the JkSetEnv that can be done with mod_cfml
to pass these variables across to Tomcat / Lucee?

Thanks.

Kind regards,

Andrew
http://about.me/andrew_dixon


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAFrbJ5XwgE8_BZYYqz0JiBcsDp2oe7vGvtULnmcGCW-VwieZuw%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAFrbJ5XwgE8_BZYYqz0JiBcsDp2oe7vGvtULnmcGCW-VwieZuw%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

Didn’t seem to make any difference defining the context in the server.xml
file.

Kind regards,

Andrew
http://about.me/andrew_dixonOn 7 February 2015 at 10:37, Andrew Dixon <@Andrew_Dixon> wrote:

Not really had any issues with the wrong context being shown and it does
mean you can add new context’s without having to restart, unless there is a
way to do this with mod_jk that I’m not aware of.

Hmmm… good point, will give that a try on my dev machine and see what
happens.

Kind regards,

Andrew
http://about.me/andrew_dixon

On 7 February 2015 at 10:32, Alex Skinner <@Alex_Skinner> wrote:

If it was me I wouldn’t use mod_cfml in production had two many instances
of wrong context being shown randomly.

But are you sure this is related to mod_cfml if u manually determine your
host config in server. XMLdoes it make a difference?

A

Sent from my phone
On 7 Feb 2015 10:21, “Andrew Dixon” <@Andrew_Dixon> wrote:

Hi All,

I know this is something that has come up before, however I’ve just come
across it again and was wondering if anyone ever managed to solve it.

When using mod_cfml as a connector between Apache and Tomcat some of the
cgi variables, particular the REDIRCET_* variables go missing, for example
cgi.REDIRECT_URL. An example of when this variable would normally exist is
when using the ErrorDocument directive in Apache, for example:

ErrorDocument 404 /404.cfm

and then in 404.cfm you could access the original URL, e.g.
/this_new_page from the cgi.REDIRECT_URL variable. Using mod_jk you can add
in some JkSetEnv to pass them through, however in this case the server is
already configured using mod_cfml, with many sites already on it and we
can’t really change to using mod_jk at this point.

Is there something similar to the JkSetEnv that can be done with
mod_cfml to pass these variables across to Tomcat / Lucee?

Thanks.

Kind regards,

Andrew
http://about.me/andrew_dixon


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAFrbJ5XwgE8_BZYYqz0JiBcsDp2oe7vGvtULnmcGCW-VwieZuw%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAFrbJ5XwgE8_BZYYqz0JiBcsDp2oe7vGvtULnmcGCW-VwieZuw%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

Andrew, correct.
If you switch to http it uses a different module, I tested with ajp and
http earlier and didn’t see the variables in the cgi dump.

Although, I have 1 question.
If I dump CGI, is that only going to dump CGI that Lucee wants me to see?

I know with ColdFusion, you can access lower level items than what is shown
when you just dump CGI.
Maybe if there is a way to see those “HIDDEN” CGI Vars, we could do more
thorough testing.

Anyone have any ideas, or do I need to jump into the source?On Monday, February 9, 2015 at 3:31:51 PM UTC-8, Andrew Dixon wrote:

Hi Jordan,

In the httpd.conf file I have:

ProxyPassMatch ^/(.+.cf[cm])(/.*)?$ ajp://localhost:8009/$1$2

am I right in thinking that this is using mod_proxy_ajp and the protocol
on the URL is ajp://?

Kind regards,

Andrew
http://about.me/andrew_dixon

On 9 February 2015 at 20:29, Jordan Michaels <jor...@viviotech.net <javascript:>> wrote:

It’s important to understand that mod_cfml is not a connector in itself.
At this point it’s just a simple helper application. Your actual
“connector” is going to be mod_proxy_html, mod_proxy_ajp, or mod_jk. It’s
likely the issue you’re experiencing has to do with your connector type and
how HTTP headers are passed to Tomcat through the specific connector.
Further, it’s important to understand that these different connector
methods use different protocols to communicate with Tomcat. mod_proxy_html
uses HTTP and mod_proxy_ajp and mod_jk use AJP. The default connector
that’s installed if you used the Railo Installers is mod_proxy_http, which
is a more simplistic protocol then AJP, but also more readily available on
all systems.

Andrew, if I were in your place I would research the different connector
methods/protocols and see if either of them have ways to pass the variables
you’re wanting to pass.

Kind regards,
Jordan Michaels

----- Original Message -----
From: “Andrew Dixon” <andrew...@gmail.com <javascript:>>
To: lu...@googlegroups.com <javascript:>
Sent: Saturday, February 7, 2015 2:37:40 AM
Subject: Re: [Lucee] Getting cgi.REDIRECT_* variables when using mod_cfml

Not really had any issues with the wrong context being shown and it does
mean you can add new context’s without having to restart, unless there is
a
way to do this with mod_jk that I’m not aware of.

Hmmm… good point, will give that a try on my dev machine and see what
happens.

Kind regards,

Andrew
http://about.me/andrew_dixon

On 7 February 2015 at 10:32, Alex Skinner <al...@pixl8.co.uk <javascript:>> wrote:

If it was me I wouldn’t use mod_cfml in production had two many
instances
of wrong context being shown randomly.

But are you sure this is related to mod_cfml if u manually determine
your
host config in server. XMLdoes it make a difference?

A

Sent from my phone
On 7 Feb 2015 10:21, “Andrew Dixon” <andrew...@gmail.com <javascript:>> wrote:

Hi All,

I know this is something that has come up before, however I’ve just
come

across it again and was wondering if anyone ever managed to solve it.

When using mod_cfml as a connector between Apache and Tomcat some of
the

cgi variables, particular the REDIRCET_* variables go missing, for
example

cgi.REDIRECT_URL. An example of when this variable would normally
exist is

when using the ErrorDocument directive in Apache, for example:

ErrorDocument 404 /404.cfm

and then in 404.cfm you could access the original URL, e.g.
/this_new_page from the cgi.REDIRECT_URL variable. Using mod_jk you
can add

in some JkSetEnv to pass them through, however in this case the server
is

already configured using mod_cfml, with many sites already on it and we
can’t really change to using mod_jk at this point.

Is there something similar to the JkSetEnv that can be done with
mod_cfml

to pass these variables across to Tomcat / Lucee?

Thanks.

Kind regards,

Andrew
http://about.me/andrew_dixon


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 <javascript:>.
To post to this group, send email to lu...@googlegroups.com
<javascript:>.

To view this discussion on the web visit

https://groups.google.com/d/msgid/lucee/CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%40mail.gmail.com

<
https://groups.google.com/d/msgid/lucee/CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%40mail.gmail.com?utm_medium=email&utm_source=footer

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


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 <javascript:>.
To post to this group, send email to lu...@googlegroups.com
<javascript:>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/lucee/CAFrbJ5XwgE8_BZYYqz0JiBcsDp2oe7vGvtULnmcGCW-VwieZuw%40mail.gmail.com

<
https://groups.google.com/d/msgid/lucee/CAFrbJ5XwgE8_BZYYqz0JiBcsDp2oe7vGvtULnmcGCW-VwieZuw%40mail.gmail.com?utm_medium=email&utm_source=footer

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


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 <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAG1WijVxpqAG6WcSRFV_c8FjBTOF1FYqiQdk_E%2BkUv_iw4aBqw%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout.


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 <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/1066754917.1213102.1423513793294.JavaMail.zimbra%40viviotech.net
.
For more options, visit https://groups.google.com/d/optout.

It’s important to understand that mod_cfml is not a connector in itself. At this point it’s just a simple helper application. Your actual “connector” is going to be mod_proxy_html, mod_proxy_ajp, or mod_jk. It’s likely the issue you’re experiencing has to do with your connector type and how HTTP headers are passed to Tomcat through the specific connector. Further, it’s important to understand that these different connector methods use different protocols to communicate with Tomcat. mod_proxy_html uses HTTP and mod_proxy_ajp and mod_jk use AJP. The default connector that’s installed if you used the Railo Installers is mod_proxy_http, which is a more simplistic protocol then AJP, but also more readily available on all systems.

Andrew, if I were in your place I would research the different connector methods/protocols and see if either of them have ways to pass the variables you’re wanting to pass.

Kind regards,
Jordan Michaels----- Original Message -----
From: “Andrew Dixon” <@Andrew_Dixon>
To: lucee@googlegroups.com
Sent: Saturday, February 7, 2015 2:37:40 AM
Subject: Re: [Lucee] Getting cgi.REDIRECT_* variables when using mod_cfml

Not really had any issues with the wrong context being shown and it does
mean you can add new context’s without having to restart, unless there is a
way to do this with mod_jk that I’m not aware of.

Hmmm… good point, will give that a try on my dev machine and see what
happens.

Kind regards,

Andrew

On 7 February 2015 at 10:32, Alex Skinner <@Alex_Skinner> wrote:

If it was me I wouldn’t use mod_cfml in production had two many instances
of wrong context being shown randomly.

But are you sure this is related to mod_cfml if u manually determine your
host config in server. XMLdoes it make a difference?

A

Sent from my phone
On 7 Feb 2015 10:21, “Andrew Dixon” <@Andrew_Dixon> wrote:

Hi All,

I know this is something that has come up before, however I’ve just come
across it again and was wondering if anyone ever managed to solve it.

When using mod_cfml as a connector between Apache and Tomcat some of the
cgi variables, particular the REDIRCET_* variables go missing, for example
cgi.REDIRECT_URL. An example of when this variable would normally exist is
when using the ErrorDocument directive in Apache, for example:

ErrorDocument 404 /404.cfm

and then in 404.cfm you could access the original URL, e.g.
/this_new_page from the cgi.REDIRECT_URL variable. Using mod_jk you can add
in some JkSetEnv to pass them through, however in this case the server is
already configured using mod_cfml, with many sites already on it and we
can’t really change to using mod_jk at this point.

Is there something similar to the JkSetEnv that can be done with mod_cfml
to pass these variables across to Tomcat / Lucee?

Thanks.

Kind regards,

Andrew
http://about.me/andrew_dixon


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAFrbJ5XwgE8_BZYYqz0JiBcsDp2oe7vGvtULnmcGCW-VwieZuw%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAFrbJ5XwgE8_BZYYqz0JiBcsDp2oe7vGvtULnmcGCW-VwieZuw%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAG1WijVxpqAG6WcSRFV_c8FjBTOF1FYqiQdk_E%2BkUv_iw4aBqw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

I did some research on this, and using AJP or HTTP doesn’t seem to path the right Headers through with ProxyPassMatch.

Although, I have 1 question.
If I dump CGI, is that only going to dump CGI that Lucee wants me to see?

I know with ColdFusion, you can access lower level items than what is shown when you just dump CGI.
Maybe if there is a way to see those “HIDDEN” CGI Vars, we could do more thorough testing.

Anyone have any ideas, or do I need to jump into the source?

Gavin Pickin
@Gavin_Pickin
http://www.gpickin.comOn Feb 9, 2015, at 12:29 PM, Jordan Michaels <@Jordan_Michaels> wrote:

It’s important to understand that mod_cfml is not a connector in itself. At this point it’s just a simple helper application. Your actual “connector” is going to be mod_proxy_html, mod_proxy_ajp, or mod_jk. It’s likely the issue you’re experiencing has to do with your connector type and how HTTP headers are passed to Tomcat through the specific connector. Further, it’s important to understand that these different connector methods use different protocols to communicate with Tomcat. mod_proxy_html uses HTTP and mod_proxy_ajp and mod_jk use AJP. The default connector that’s installed if you used the Railo Installers is mod_proxy_http, which is a more simplistic protocol then AJP, but also more readily available on all systems.

Andrew, if I were in your place I would research the different connector methods/protocols and see if either of them have ways to pass the variables you’re wanting to pass.

Kind regards,
Jordan Michaels

----- Original Message -----
From: “Andrew Dixon” <@Andrew_Dixon>
To: lucee@googlegroups.com
Sent: Saturday, February 7, 2015 2:37:40 AM
Subject: Re: [Lucee] Getting cgi.REDIRECT_* variables when using mod_cfml

Not really had any issues with the wrong context being shown and it does
mean you can add new context’s without having to restart, unless there is a
way to do this with mod_jk that I’m not aware of.

Hmmm… good point, will give that a try on my dev machine and see what
happens.

Kind regards,

Andrew
http://about.me/andrew_dixon

On 7 February 2015 at 10:32, Alex Skinner <@Alex_Skinner> wrote:

If it was me I wouldn’t use mod_cfml in production had two many instances
of wrong context being shown randomly.

But are you sure this is related to mod_cfml if u manually determine your
host config in server. XMLdoes it make a difference?

A

Sent from my phone
On 7 Feb 2015 10:21, “Andrew Dixon” <@Andrew_Dixon> wrote:

Hi All,

I know this is something that has come up before, however I’ve just come
across it again and was wondering if anyone ever managed to solve it.

When using mod_cfml as a connector between Apache and Tomcat some of the
cgi variables, particular the REDIRCET_* variables go missing, for example
cgi.REDIRECT_URL. An example of when this variable would normally exist is
when using the ErrorDocument directive in Apache, for example:

ErrorDocument 404 /404.cfm

and then in 404.cfm you could access the original URL, e.g.
/this_new_page from the cgi.REDIRECT_URL variable. Using mod_jk you can add
in some JkSetEnv to pass them through, however in this case the server is
already configured using mod_cfml, with many sites already on it and we
can’t really change to using mod_jk at this point.

Is there something similar to the JkSetEnv that can be done with mod_cfml
to pass these variables across to Tomcat / Lucee?

Thanks.

Kind regards,

Andrew
http://about.me/andrew_dixon


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAFrbJ5XwgE8_BZYYqz0JiBcsDp2oe7vGvtULnmcGCW-VwieZuw%40mail.gmail.com
https://groups.google.com/d/msgid/lucee/CAFrbJ5XwgE8_BZYYqz0JiBcsDp2oe7vGvtULnmcGCW-VwieZuw%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visithttps://groups.google.com/d/msgid/lucee/CAG1WijVxpqAG6WcSRFV_c8FjBTOF1FYqiQdk_E%2BkUv_iw4aBqw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visithttps://groups.google.com/d/msgid/lucee/1066754917.1213102.1423513793294.JavaMail.zimbra%40viviotech.net.
For more options, visit https://groups.google.com/d/optout.

Hi Jordan,

In the httpd.conf file I have:

ProxyPassMatch ^/(.+.cf[cm])(/.*)?$ ajp://localhost:8009/$1$2

am I right in thinking that this is using mod_proxy_ajp and the protocol on
the URL is ajp://?

Kind regards,

Andrew
http://about.me/andrew_dixonOn 9 February 2015 at 20:29, Jordan Michaels <@Jordan_Michaels> wrote:

It’s important to understand that mod_cfml is not a connector in itself.
At this point it’s just a simple helper application. Your actual
“connector” is going to be mod_proxy_html, mod_proxy_ajp, or mod_jk. It’s
likely the issue you’re experiencing has to do with your connector type and
how HTTP headers are passed to Tomcat through the specific connector.
Further, it’s important to understand that these different connector
methods use different protocols to communicate with Tomcat. mod_proxy_html
uses HTTP and mod_proxy_ajp and mod_jk use AJP. The default connector
that’s installed if you used the Railo Installers is mod_proxy_http, which
is a more simplistic protocol then AJP, but also more readily available on
all systems.

Andrew, if I were in your place I would research the different connector
methods/protocols and see if either of them have ways to pass the variables
you’re wanting to pass.

Kind regards,
Jordan Michaels

----- Original Message -----
From: “Andrew Dixon” <@Andrew_Dixon>
To: lucee@googlegroups.com
Sent: Saturday, February 7, 2015 2:37:40 AM
Subject: Re: [Lucee] Getting cgi.REDIRECT_* variables when using mod_cfml

Not really had any issues with the wrong context being shown and it does
mean you can add new context’s without having to restart, unless there is a
way to do this with mod_jk that I’m not aware of.

Hmmm… good point, will give that a try on my dev machine and see what
happens.

Kind regards,

Andrew
http://about.me/andrew_dixon

On 7 February 2015 at 10:32, Alex Skinner <@Alex_Skinner> wrote:

If it was me I wouldn’t use mod_cfml in production had two many instances
of wrong context being shown randomly.

But are you sure this is related to mod_cfml if u manually determine your
host config in server. XMLdoes it make a difference?

A

Sent from my phone
On 7 Feb 2015 10:21, “Andrew Dixon” <@Andrew_Dixon> wrote:

Hi All,

I know this is something that has come up before, however I’ve just come
across it again and was wondering if anyone ever managed to solve it.

When using mod_cfml as a connector between Apache and Tomcat some of the
cgi variables, particular the REDIRCET_* variables go missing, for
example

cgi.REDIRECT_URL. An example of when this variable would normally exist
is

when using the ErrorDocument directive in Apache, for example:

ErrorDocument 404 /404.cfm

and then in 404.cfm you could access the original URL, e.g.
/this_new_page from the cgi.REDIRECT_URL variable. Using mod_jk you can
add

in some JkSetEnv to pass them through, however in this case the server
is

already configured using mod_cfml, with many sites already on it and we
can’t really change to using mod_jk at this point.

Is there something similar to the JkSetEnv that can be done with
mod_cfml

to pass these variables across to Tomcat / Lucee?

Thanks.

Kind regards,

Andrew
http://about.me/andrew_dixon


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit

https://groups.google.com/d/msgid/lucee/CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%40mail.gmail.com

<
https://groups.google.com/d/msgid/lucee/CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%40mail.gmail.com?utm_medium=email&utm_source=footer

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


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit

https://groups.google.com/d/msgid/lucee/CAFrbJ5XwgE8_BZYYqz0JiBcsDp2oe7vGvtULnmcGCW-VwieZuw%40mail.gmail.com

<
https://groups.google.com/d/msgid/lucee/CAFrbJ5XwgE8_BZYYqz0JiBcsDp2oe7vGvtULnmcGCW-VwieZuw%40mail.gmail.com?utm_medium=email&utm_source=footer

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


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAG1WijVxpqAG6WcSRFV_c8FjBTOF1FYqiQdk_E%2BkUv_iw4aBqw%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/1066754917.1213102.1423513793294.JavaMail.zimbra%40viviotech.net
.
For more options, visit https://groups.google.com/d/optout.

For some of those “hidden” variables, you can use GetHttpRequestData() to pull the HTTP request object directly. For example: GetHttpRequestData().headers[‘host’]

I’m not sure how “ErrorDocument” is passed in the HTTP request, or if it’s passed at all, but understanding how that works seems to be the key.

-Jordan----- Original Message -----
From: “Gavin Pickin” <@Gavin_Pickin>
To: lucee@googlegroups.com
Sent: Monday, February 9, 2015 3:35:31 PM
Subject: Re: [Lucee] Getting cgi.REDIRECT_* variables when using mod_cfml

Andrew, correct.
If you switch to http it uses a different module, I tested with ajp and
http earlier and didn’t see the variables in the cgi dump.

Although, I have 1 question.
If I dump CGI, is that only going to dump CGI that Lucee wants me to see?

I know with ColdFusion, you can access lower level items than what is shown
when you just dump CGI.
Maybe if there is a way to see those “HIDDEN” CGI Vars, we could do more
thorough testing.

Anyone have any ideas, or do I need to jump into the source?

On Monday, February 9, 2015 at 3:31:51 PM UTC-8, Andrew Dixon wrote:

Hi Jordan,

In the httpd.conf file I have:

ProxyPassMatch ^/(.+.cf[cm])(/.*)?$ ajp://localhost:8009/$1$2

am I right in thinking that this is using mod_proxy_ajp and the protocol
on the URL is ajp://?

Kind regards,

Andrew
http://about.me/andrew_dixon

On 9 February 2015 at 20:29, Jordan Michaels <jor...@viviotech.net <javascript:>> wrote:

It’s important to understand that mod_cfml is not a connector in itself.
At this point it’s just a simple helper application. Your actual
“connector” is going to be mod_proxy_html, mod_proxy_ajp, or mod_jk. It’s
likely the issue you’re experiencing has to do with your connector type and
how HTTP headers are passed to Tomcat through the specific connector.
Further, it’s important to understand that these different connector
methods use different protocols to communicate with Tomcat. mod_proxy_html
uses HTTP and mod_proxy_ajp and mod_jk use AJP. The default connector
that’s installed if you used the Railo Installers is mod_proxy_http, which
is a more simplistic protocol then AJP, but also more readily available on
all systems.

Andrew, if I were in your place I would research the different connector
methods/protocols and see if either of them have ways to pass the variables
you’re wanting to pass.

Kind regards,
Jordan Michaels

----- Original Message -----
From: “Andrew Dixon” <andrew...@gmail.com <javascript:>>
To: lu...@googlegroups.com <javascript:>
Sent: Saturday, February 7, 2015 2:37:40 AM
Subject: Re: [Lucee] Getting cgi.REDIRECT_* variables when using mod_cfml

Not really had any issues with the wrong context being shown and it does
mean you can add new context’s without having to restart, unless there is
a
way to do this with mod_jk that I’m not aware of.

Hmmm… good point, will give that a try on my dev machine and see what
happens.

Kind regards,

Andrew
http://about.me/andrew_dixon

On 7 February 2015 at 10:32, Alex Skinner <al...@pixl8.co.uk <javascript:>> wrote:

If it was me I wouldn’t use mod_cfml in production had two many
instances
of wrong context being shown randomly.

But are you sure this is related to mod_cfml if u manually determine
your
host config in server. XMLdoes it make a difference?

A

Sent from my phone
On 7 Feb 2015 10:21, “Andrew Dixon” <andrew...@gmail.com <javascript:>> wrote:

Hi All,

I know this is something that has come up before, however I’ve just
come

across it again and was wondering if anyone ever managed to solve it.

When using mod_cfml as a connector between Apache and Tomcat some of
the

cgi variables, particular the REDIRCET_* variables go missing, for
example

cgi.REDIRECT_URL. An example of when this variable would normally
exist is

when using the ErrorDocument directive in Apache, for example:

ErrorDocument 404 /404.cfm

and then in 404.cfm you could access the original URL, e.g.
/this_new_page from the cgi.REDIRECT_URL variable. Using mod_jk you
can add

in some JkSetEnv to pass them through, however in this case the server
is

already configured using mod_cfml, with many sites already on it and we
can’t really change to using mod_jk at this point.

Is there something similar to the JkSetEnv that can be done with
mod_cfml

to pass these variables across to Tomcat / Lucee?

Thanks.

Kind regards,

Andrew
http://about.me/andrew_dixon


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 <javascript:>.
To post to this group, send email to lu...@googlegroups.com
<javascript:>.

To view this discussion on the web visit

https://groups.google.com/d/msgid/lucee/CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%40mail.gmail.com

<
https://groups.google.com/d/msgid/lucee/CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%40mail.gmail.com?utm_medium=email&utm_source=footer

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


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 <javascript:>.
To post to this group, send email to lu...@googlegroups.com
<javascript:>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/lucee/CAFrbJ5XwgE8_BZYYqz0JiBcsDp2oe7vGvtULnmcGCW-VwieZuw%40mail.gmail.com

<
https://groups.google.com/d/msgid/lucee/CAFrbJ5XwgE8_BZYYqz0JiBcsDp2oe7vGvtULnmcGCW-VwieZuw%40mail.gmail.com?utm_medium=email&utm_source=footer

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


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 <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAG1WijVxpqAG6WcSRFV_c8FjBTOF1FYqiQdk_E%2BkUv_iw4aBqw%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout.


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 <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/1066754917.1213102.1423513793294.JavaMail.zimbra%40viviotech.net
.
For more options, visit https://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/de2bea11-132a-4449-9008-81719837fcaf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Gavin and Jordan,

Ok, I have made a small amount of progress here after much messing around
with various things and just trying stuff out. In the .htaccess file if I
have:

ErrorDocument 404 /404.cfm
RequestHeader set REDIRECT_URL ‘hello’

and then in 404.cfm I have:

I get:

stringhello

If I then change the .htaccess “RequestHeader set” to:

RequestHeader set REDIRECT_URL %{REDIRECT_URL}e

I would then expect to get the right value but instead I get:
string(null)
I’ve checked and checked the syntax for picking up the Apache environment
variables and from everything I can find that is the correct syntax. Also
looking at this page from the Apache docs:

http://httpd.apache.org/docs/2.2/custom-error.html

The REDIRECT_URL value should be defined. Very strange.

Any ideas?

Kind regards,

Andrew
http://about.me/andrew_dixonOn 10 February 2015 at 00:43, Jordan Michaels <@Jordan_Michaels> wrote:

If it’s not passed, then it’s probably just used internally in Apache. If
that’s the case, then you might need to configure Tomcat to only handle a
request if the requested resource is found. There’s a config for that…
let me see if I can remember/find it…

Here we go:
resourceOnlyServlets

http://tomcat.apache.org/tomcat-7.0-doc/config/context.html

I remember having to use this in the past for some similar reason… I
think it might have been so that Apache would produce an folder index?? I’m
not sure, but that’s the only reason I remember this option.

At the time, it prevented Tomcat from responding to a request that it
didn’t need to. Perhaps it will work in your situation as well?

Warm Regards,
Jordan Michaels

On 02/09/2015 04:33 PM, Gavin Pickin wrote:

With I get the following using GetHttpRequestData()
using HTTP with ProxyPassMatch I get the following

content
headers
accept
accept-encoding
accept-langage
connection
cookie
host
user-agent
x-forwarded-for
x-forwarded-host
x-forwarded-server
method
protocol

With AJP I get the following

content
headers
accept
accept-encoding
accept-langage
cache-control
connection
cookie
host
user-agent
method
protocol

So AJP has a cache-control header, but it is missing the following

x-forwarded-for
x-forwarded-host
x-forwarded-server

Note, no path or query string is visibly passed with an ErrorDocument
404 /404.cfm using this method.

Gavin Pickin
@Gavin_Pickin mailto:Gavin_Pickin
http://www.gpickin.com

On Feb 9, 2015, at 4:07 PM, Jordan Michaels <@Jordan_Michaels mailto:Jordan_Michaels> wrote:

For some of those “hidden” variables, you can use GetHttpRequestData()

to pull the HTTP request object directly. For example:
GetHttpRequestData().headers[‘host’]

I’m not sure how “ErrorDocument” is passed in the HTTP request, or if
it’s passed at all, but understanding how that works seems to be the key.

-Jordan

----- Original Message -----
From: “Gavin Pickin” <@Gavin_Pickin mailto:Gavin_Pickin>
To:lucee@googlegroups.com mailto:lucee@googlegroups.com
Sent: Monday, February 9, 2015 3:35:31 PM
Subject: Re: [Lucee] Getting cgi.REDIRECT_* variables when using mod_cfml

Andrew, correct.
If you switch to http it uses a different module, I tested with ajp and
http earlier and didn’t see the variables in the cgi dump.

Although, I have 1 question.
If I dump CGI, is that only going to dump CGI that Lucee wants me to see?

I know with ColdFusion, you can access lower level items than what is
shown
when you just dump CGI.
Maybe if there is a way to see those “HIDDEN” CGI Vars, we could do more
thorough testing.

Anyone have any ideas, or do I need to jump into the source?

On Monday, February 9, 2015 at 3:31:51 PM UTC-8, Andrew Dixon wrote:

Hi Jordan,

In the httpd.conf file I have:

ProxyPassMatch ^/(.+.cf[cm])(/.*)?$ ajp://localhost:8009/$1$2

am I right in thinking that this is using mod_proxy_ajp and the protocol
on the URL is ajp://?

Kind regards,

Andrew
http://about.me/andrew_dixon

On 9 February 2015 at 20:29, Jordan Michaels <jor...@viviotech.net <javascript:>> wrote:

It’s important to understand that mod_cfml is not a connector in

itself.
At this point it’s just a simple helper application. Your actual
“connector” is going to be mod_proxy_html, mod_proxy_ajp, or mod_jk.
It’s
likely the issue you’re experiencing has to do with your connector
type and
how HTTP headers are passed to Tomcat through the specific connector.
Further, it’s important to understand that these different connector
methods use different protocols to communicate with Tomcat.
mod_proxy_html
uses HTTP and mod_proxy_ajp and mod_jk use AJP. The default connector
that’s installed if you used the Railo Installers is mod_proxy_http,
which
is a more simplistic protocol then AJP, but also more readily
available on
all systems.

Andrew, if I were in your place I would research the different
connector
methods/protocols and see if either of them have ways to pass the
variables
you’re wanting to pass.

Kind regards,
Jordan Michaels

----- Original Message -----
From: “Andrew Dixon” <andrew...@gmail.com
http://gmail.com/<javascript:>>
To: lu...@googlegroups.com http://googlegroups.com/<javascript:>
Sent: Saturday, February 7, 2015 2:37:40 AM
Subject: Re: [Lucee] Getting cgi.REDIRECT_* variables when using
mod_cfml

Not really had any issues with the wrong context being shown and it
does
mean you can add new context’s without having to restart, unless
there is
a
way to do this with mod_jk that I’m not aware of.

Hmmm… good point, will give that a try on my dev machine and see what
happens.

Kind regards,

Andrew
http://about.me/andrew_dixon

On 7 February 2015 at 10:32, Alex Skinner <al...@pixl8.co.uk http://pixl8.co.uk/ <javascript:>> wrote:

If it was me I wouldn’t use mod_cfml in production had two many

instances

of wrong context being shown randomly.

But are you sure this is related to mod_cfml if u manually determine

your

host config in server. XMLdoes it make a difference?

A

Sent from my phone
On 7 Feb 2015 10:21, “Andrew Dixon” <andrew...@gmail.com http://gmail.com/<javascript:>> wrote:

Hi All,

I know this is something that has come up before, however I’ve just

come

across it again and was wondering if anyone ever managed to solve it.

When using mod_cfml as a connector between Apache and Tomcat some of

the

cgi variables, particular the REDIRCET_* variables go missing, for

example

cgi.REDIRECT_URL. An example of when this variable would normally

exist is

when using the ErrorDocument directive in Apache, for example:

ErrorDocument 404 /404.cfm

and then in 404.cfm you could access the original URL, e.g.
/this_new_page from the cgi.REDIRECT_URL variable. Using mod_jk you

can add

in some JkSetEnv to pass them through, however in this case the server

is

already configured using mod_cfml, with many sites already on it

and we
can’t really change to using mod_jk at this point.

Is there something similar to the JkSetEnv that can be done with

mod_cfml

to pass these variables across to Tomcat / Lucee?

Thanks.

Kind regards,

Andrew
http://about.me/andrew_dixon


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

http://googlegroups.com/<javascript:>.
To post to this group, send email to lu...@googlegroups.com
http://googlegroups.com/

<javascript:>.

To view this discussion on the web visit

https://groups.google.com/d/msgid/lucee/
CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%40mail.gmail.com

<

https://groups.google.com/d/msgid/lucee/
CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%
40mail.gmail.com?utm_medium=email&utm_source=footer

.

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


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
http://googlegroups.com/<javascript:>.
To post to this group, send email to lu...@googlegroups.com
http://googlegroups.com/

<javascript:>.

To view this discussion on the web visit

https://groups.google.com/d/msgid/lucee/CAFrbJ5XwgE8_
BZYYqz0JiBcsDp2oe7vGvtULnmcGCW-VwieZuw%40mail.gmail.com

<

https://groups.google.com/d/msgid/lucee/CAFrbJ5XwgE8_
BZYYqz0JiBcsDp2oe7vGvtULnmcGCW-VwieZuw%40mail.gmail.com?utm_
medium=email&utm_source=footer

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


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
http://googlegroups.com/<javascript:>.
To post to this group, send email to lu...@googlegroups.com
http://googlegroups.com/<javascript:>
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAG1WijVxpqAG6WcSRFV_
c8FjBTOF1FYqiQdk_E%2BkUv_iw4aBqw%40mail.gmail.com
.
For more options, visithttps://groups.google.com/d/optout.


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
http://googlegroups.com/<javascript:>.
To post to this group, send email to lu...@googlegroups.com
http://googlegroups.com/<javascript:>
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/1066754917.
1213102.1423513793294.JavaMail.zimbra%40viviotech.net
.
For more options, visit https://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/de2bea11-132a-
4449-9008-81719837fcaf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 tolucee+unsubscribe@googlegroups.com
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email tolucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web
visithttps://groups.google.com/d/msgid/lucee/248147337.
1213852.1423526832281.JavaMail.zimbra%40viviotech.net.
For more options, visithttps://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/F04DAD38-B238-
4371-999C-AE91CEBCAE2D%40gmail.com
<https://groups.google.com/d/msgid/lucee/F04DAD38-B238-
4371-999C-AE91CEBCAE2D%40gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/
msgid/lucee/54D95425.9040405%40viviotech.net.

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

With I get the following using GetHttpRequestData()
using HTTP with ProxyPassMatch I get the following

content
headers
accept
accept-encoding
accept-langage
connection
cookie
host
user-agent
x-forwarded-for
x-forwarded-host
x-forwarded-server
method
protocol

With AJP I get the following

content
headers
accept
accept-encoding
accept-langage
cache-control
connection
cookie
host
user-agent
method
protocol

So AJP has a cache-control header, but it is missing the following

x-forwarded-for
x-forwarded-host
x-forwarded-server

Note, no path or query string is visibly passed with an ErrorDocument 404 /404.cfm using this method.

Gavin Pickin
@Gavin_Pickin
http://www.gpickin.comOn Feb 9, 2015, at 4:07 PM, Jordan Michaels <@Jordan_Michaels> wrote:

For some of those “hidden” variables, you can use GetHttpRequestData() to pull the HTTP request object directly. For example: GetHttpRequestData().headers[‘host’]

I’m not sure how “ErrorDocument” is passed in the HTTP request, or if it’s passed at all, but understanding how that works seems to be the key.

-Jordan

----- Original Message -----
From: “Gavin Pickin” <@Gavin_Pickin>
To: lucee@googlegroups.com
Sent: Monday, February 9, 2015 3:35:31 PM
Subject: Re: [Lucee] Getting cgi.REDIRECT_* variables when using mod_cfml

Andrew, correct.
If you switch to http it uses a different module, I tested with ajp and
http earlier and didn’t see the variables in the cgi dump.

Although, I have 1 question.
If I dump CGI, is that only going to dump CGI that Lucee wants me to see?

I know with ColdFusion, you can access lower level items than what is shown
when you just dump CGI.
Maybe if there is a way to see those “HIDDEN” CGI Vars, we could do more
thorough testing.

Anyone have any ideas, or do I need to jump into the source?

On Monday, February 9, 2015 at 3:31:51 PM UTC-8, Andrew Dixon wrote:

Hi Jordan,

In the httpd.conf file I have:

ProxyPassMatch ^/(.+.cf[cm])(/.*)?$ ajp://localhost:8009/$1$2

am I right in thinking that this is using mod_proxy_ajp and the protocol
on the URL is ajp://?

Kind regards,

Andrew
http://about.me/andrew_dixon

On 9 February 2015 at 20:29, Jordan Michaels <jor...@viviotech.net <javascript:>> wrote:

It’s important to understand that mod_cfml is not a connector in itself.
At this point it’s just a simple helper application. Your actual
“connector” is going to be mod_proxy_html, mod_proxy_ajp, or mod_jk. It’s
likely the issue you’re experiencing has to do with your connector type and
how HTTP headers are passed to Tomcat through the specific connector.
Further, it’s important to understand that these different connector
methods use different protocols to communicate with Tomcat. mod_proxy_html
uses HTTP and mod_proxy_ajp and mod_jk use AJP. The default connector
that’s installed if you used the Railo Installers is mod_proxy_http, which
is a more simplistic protocol then AJP, but also more readily available on
all systems.

Andrew, if I were in your place I would research the different connector
methods/protocols and see if either of them have ways to pass the variables
you’re wanting to pass.

Kind regards,
Jordan Michaels

----- Original Message -----
From: “Andrew Dixon” <andrew...@gmail.com <javascript:>>
To: lu...@googlegroups.com <javascript:>
Sent: Saturday, February 7, 2015 2:37:40 AM
Subject: Re: [Lucee] Getting cgi.REDIRECT_* variables when using mod_cfml

Not really had any issues with the wrong context being shown and it does
mean you can add new context’s without having to restart, unless there is
a
way to do this with mod_jk that I’m not aware of.

Hmmm… good point, will give that a try on my dev machine and see what
happens.

Kind regards,

Andrew
http://about.me/andrew_dixon

On 7 February 2015 at 10:32, Alex Skinner <al...@pixl8.co.uk <javascript:>> wrote:

If it was me I wouldn’t use mod_cfml in production had two many
instances
of wrong context being shown randomly.

But are you sure this is related to mod_cfml if u manually determine
your
host config in server. XMLdoes it make a difference?

A

Sent from my phone
On 7 Feb 2015 10:21, “Andrew Dixon” <andrew...@gmail.com <javascript:>> wrote:

Hi All,

I know this is something that has come up before, however I’ve just
come

across it again and was wondering if anyone ever managed to solve it.

When using mod_cfml as a connector between Apache and Tomcat some of
the

cgi variables, particular the REDIRCET_* variables go missing, for
example

cgi.REDIRECT_URL. An example of when this variable would normally
exist is

when using the ErrorDocument directive in Apache, for example:

ErrorDocument 404 /404.cfm

and then in 404.cfm you could access the original URL, e.g.
/this_new_page from the cgi.REDIRECT_URL variable. Using mod_jk you
can add

in some JkSetEnv to pass them through, however in this case the server
is

already configured using mod_cfml, with many sites already on it and we
can’t really change to using mod_jk at this point.

Is there something similar to the JkSetEnv that can be done with
mod_cfml

to pass these variables across to Tomcat / Lucee?

Thanks.

Kind regards,

Andrew
http://about.me/andrew_dixon


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 <javascript:>.
To post to this group, send email to lu...@googlegroups.com
<javascript:>.

To view this discussion on the web visit

https://groups.google.com/d/msgid/lucee/CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%40mail.gmail.com

<
https://groups.google.com/d/msgid/lucee/CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%40mail.gmail.com?utm_medium=email&utm_source=footer

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


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 <javascript:>.
To post to this group, send email to lu...@googlegroups.com
<javascript:>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/lucee/CAFrbJ5XwgE8_BZYYqz0JiBcsDp2oe7vGvtULnmcGCW-VwieZuw%40mail.gmail.com

<
https://groups.google.com/d/msgid/lucee/CAFrbJ5XwgE8_BZYYqz0JiBcsDp2oe7vGvtULnmcGCW-VwieZuw%40mail.gmail.com?utm_medium=email&utm_source=footer

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


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 <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAG1WijVxpqAG6WcSRFV_c8FjBTOF1FYqiQdk_E%2BkUv_iw4aBqw%40mail.gmail.com
.
For more options, visit https://groups.google.com/d/optout.


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 <javascript:>.
To post to this group, send email to lu...@googlegroups.com <javascript:>
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/1066754917.1213102.1423513793294.JavaMail.zimbra%40viviotech.net
.
For more options, visit https://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/de2bea11-132a-4449-9008-81719837fcaf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visithttps://groups.google.com/d/msgid/lucee/248147337.1213852.1423526832281.JavaMail.zimbra%40viviotech.net.
For more options, visit https://groups.google.com/d/optout.

If it’s not passed, then it’s probably just used internally in Apache.
If that’s the case, then you might need to configure Tomcat to only
handle a request if the requested resource is found. There’s a config
for that… let me see if I can remember/find it…

Here we go:
resourceOnlyServlets

http://tomcat.apache.org/tomcat-7.0-doc/config/context.html

I remember having to use this in the past for some similar reason… I
think it might have been so that Apache would produce an folder index??
I’m not sure, but that’s the only reason I remember this option.

At the time, it prevented Tomcat from responding to a request that it
didn’t need to. Perhaps it will work in your situation as well?

Warm Regards,
Jordan MichaelsOn 02/09/2015 04:33 PM, Gavin Pickin wrote:

With I get the following using GetHttpRequestData()
using HTTP with ProxyPassMatch I get the following

content
headers
accept
accept-encoding
accept-langage
connection
cookie
host
user-agent
x-forwarded-for
x-forwarded-host
x-forwarded-server
method
protocol

With AJP I get the following

content
headers
accept
accept-encoding
accept-langage
cache-control
connection
cookie
host
user-agent
method
protocol

So AJP has a cache-control header, but it is missing the following

x-forwarded-for
x-forwarded-host
x-forwarded-server

Note, no path or query string is visibly passed with an ErrorDocument
404 /404.cfm using this method.

Gavin Pickin
@Gavin_Pickin mailto:Gavin_Pickin
http://www.gpickin.com

On Feb 9, 2015, at 4:07 PM, Jordan Michaels <@Jordan_Michaels mailto:Jordan_Michaels> wrote:

For some of those “hidden” variables, you can use GetHttpRequestData()
to pull the HTTP request object directly. For example:
GetHttpRequestData().headers[‘host’]

I’m not sure how “ErrorDocument” is passed in the HTTP request, or if
it’s passed at all, but understanding how that works seems to be the key.

-Jordan

----- Original Message -----
From: “Gavin Pickin” <@Gavin_Pickin mailto:Gavin_Pickin>
To:lucee@googlegroups.com mailto:lucee@googlegroups.com
Sent: Monday, February 9, 2015 3:35:31 PM
Subject: Re: [Lucee] Getting cgi.REDIRECT_* variables when using mod_cfml

Andrew, correct.
If you switch to http it uses a different module, I tested with ajp and
http earlier and didn’t see the variables in the cgi dump.

Although, I have 1 question.
If I dump CGI, is that only going to dump CGI that Lucee wants me to see?

I know with ColdFusion, you can access lower level items than what is
shown
when you just dump CGI.
Maybe if there is a way to see those “HIDDEN” CGI Vars, we could do more
thorough testing.

Anyone have any ideas, or do I need to jump into the source?

On Monday, February 9, 2015 at 3:31:51 PM UTC-8, Andrew Dixon wrote:

Hi Jordan,

In the httpd.conf file I have:

ProxyPassMatch ^/(.+.cf[cm])(/.*)?$ ajp://localhost:8009/$1$2

am I right in thinking that this is using mod_proxy_ajp and the protocol
on the URL is ajp://?

Kind regards,

Andrew
http://about.me/andrew_dixon

On 9 February 2015 at 20:29, Jordan Michaels <jor...@viviotech.net <javascript:>> wrote:

It’s important to understand that mod_cfml is not a connector in itself.
At this point it’s just a simple helper application. Your actual
“connector” is going to be mod_proxy_html, mod_proxy_ajp, or mod_jk.
It’s
likely the issue you’re experiencing has to do with your connector
type and
how HTTP headers are passed to Tomcat through the specific connector.
Further, it’s important to understand that these different connector
methods use different protocols to communicate with Tomcat.
mod_proxy_html
uses HTTP and mod_proxy_ajp and mod_jk use AJP. The default connector
that’s installed if you used the Railo Installers is mod_proxy_http,
which
is a more simplistic protocol then AJP, but also more readily
available on
all systems.

Andrew, if I were in your place I would research the different connector
methods/protocols and see if either of them have ways to pass the
variables
you’re wanting to pass.

Kind regards,
Jordan Michaels

----- Original Message -----
From: “Andrew Dixon” <andrew...@gmail.com
http://gmail.com/<javascript:>>
To: lu...@googlegroups.com http://googlegroups.com/<javascript:>
Sent: Saturday, February 7, 2015 2:37:40 AM
Subject: Re: [Lucee] Getting cgi.REDIRECT_* variables when using
mod_cfml

Not really had any issues with the wrong context being shown and it does
mean you can add new context’s without having to restart, unless
there is
a
way to do this with mod_jk that I’m not aware of.

Hmmm… good point, will give that a try on my dev machine and see what
happens.

Kind regards,

Andrew
http://about.me/andrew_dixon

On 7 February 2015 at 10:32, Alex Skinner <al...@pixl8.co.uk http://pixl8.co.uk/ <javascript:>> wrote:

If it was me I wouldn’t use mod_cfml in production had two many
instances
of wrong context being shown randomly.

But are you sure this is related to mod_cfml if u manually determine
your
host config in server. XMLdoes it make a difference?

A

Sent from my phone
On 7 Feb 2015 10:21, “Andrew Dixon” <andrew...@gmail.com http://gmail.com/<javascript:>> wrote:

Hi All,

I know this is something that has come up before, however I’ve just
come

across it again and was wondering if anyone ever managed to solve it.

When using mod_cfml as a connector between Apache and Tomcat some of
the

cgi variables, particular the REDIRCET_* variables go missing, for
example

cgi.REDIRECT_URL. An example of when this variable would normally
exist is

when using the ErrorDocument directive in Apache, for example:

ErrorDocument 404 /404.cfm

and then in 404.cfm you could access the original URL, e.g.
/this_new_page from the cgi.REDIRECT_URL variable. Using mod_jk you
can add

in some JkSetEnv to pass them through, however in this case the server
is

already configured using mod_cfml, with many sites already on it
and we
can’t really change to using mod_jk at this point.

Is there something similar to the JkSetEnv that can be done with
mod_cfml

to pass these variables across to Tomcat / Lucee?

Thanks.

Kind regards,

Andrew
http://about.me/andrew_dixon


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
http://googlegroups.com/<javascript:>.
To post to this group, send email to lu...@googlegroups.com
http://googlegroups.com/
<javascript:>.

To view this discussion on the web visit

https://groups.google.com/d/msgid/lucee/CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%40mail.gmail.com

<
https://groups.google.com/d/msgid/lucee/CAG1WijUZjJc90PbpdkTqcMWXWBFDm9K%2Bb_Hx4y7JcMDkn7_0DQ%40mail.gmail.com?utm_medium=email&utm_source=footer

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


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
http://googlegroups.com/<javascript:>.
To post to this group, send email to lu...@googlegroups.com
http://googlegroups.com/
<javascript:>.
To view this discussion on the web visit

https://groups.google.com/d/msgid/lucee/CAFrbJ5XwgE8_BZYYqz0JiBcsDp2oe7vGvtULnmcGCW-VwieZuw%40mail.gmail.com

<
https://groups.google.com/d/msgid/lucee/CAFrbJ5XwgE8_BZYYqz0JiBcsDp2oe7vGvtULnmcGCW-VwieZuw%40mail.gmail.com?utm_medium=email&utm_source=footer

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


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
http://googlegroups.com/<javascript:>.
To post to this group, send email to lu...@googlegroups.com
http://googlegroups.com/<javascript:>
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/CAG1WijVxpqAG6WcSRFV_c8FjBTOF1FYqiQdk_E%2BkUv_iw4aBqw%40mail.gmail.com
.
For more options, visithttps://groups.google.com/d/optout.


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
http://googlegroups.com/<javascript:>.
To post to this group, send email to lu...@googlegroups.com
http://googlegroups.com/<javascript:>
.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/1066754917.1213102.1423513793294.JavaMail.zimbra%40viviotech.net
.
For more options, visit https://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/de2bea11-132a-4449-9008-81719837fcaf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 tolucee+unsubscribe@googlegroups.com
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email tolucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web
visithttps://groups.google.com/d/msgid/lucee/248147337.1213852.1423526832281.JavaMail.zimbra%40viviotech.net.
For more options, visithttps://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com
mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com
mailto:lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/F04DAD38-B238-4371-999C-AE91CEBCAE2D%40gmail.com
https://groups.google.com/d/msgid/lucee/F04DAD38-B238-4371-999C-AE91CEBCAE2D%40gmail.com?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

I think we’re confusing some important aspects of this problem… although I could be wrong, and I might be. :slight_smile:

Request Headers, Server Variables and Environment settings.

You set them and access them very differently… and it seems like Request Headers are being passed through, but only a limited set of CGI Environment Variables are.
I also found something that said the ProxyPass is sometimes called BEFORE other settings are created… which isn’t helpful… but lets hope what I found gets around that.

The other thing we are forgetting is, there are 2 requests happening, and I believe, the variables are overwriting themselves.

Hi All,

I know this is something that has come up before, however I’ve just come
across it again and was wondering if anyone ever managed to solve it.

When using mod_cfml as a connector between Apache and Tomcat some of the
cgi variables, particular the REDIRCET_* variables go missing, for example
cgi.REDIRECT_URL. An example of when this variable would normally exist is
when using the ErrorDocument directive in Apache, for example:

What I have just done is based on
https://groups.google.com/d/msg/railo/U9TSv3L4j94/ASz-2JQD29wJ
Sorry for the late reply, but I’m just now migrating some sites that used
the CGI scope.

So in tomcat/conf/web.xml add

RemoteIpFilter
org.apache.catalina.filters.RemoteIpFilter

RemoteIpFilter /* REQUEST

and then cgi.remote_addr and remote_host take their values from what
Apache saw, not what Tomcat saw.

TomOn Saturday, February 7, 2015 at 10:21:52 AM UTC, Andrew Dixon wrote:

Hi Gavin,

The way I solved it, is by using mod_jk, together with the following httpd settings in httpd.conf:

--------------------start--------------------------

Load mod_jk module, if not yet loaded

<IfModule !jk_module>
LoadModule jk_module modules/mod_jk.so

Where to find workers.properties

JkWorkersFile modjk/workers.properties

Where to put jk shared memory

JkShmFile modjk/mod_jk.shm

Where to put jk logs

JkLogFile modjk/mod_jk.log

Set the jk log level [debug/error/info]

JkLogLevel info

Make sure Apache httpd redirect headers are sent through to Tomcat

JkEnvVar REDIRECT_URL “”
JkEnvVar REDIRECT_REMOTE_HOST “”
JkEnvVar REDIRECT_PATH “”
JkEnvVar REDIRECT_QUERY_STRING “”
JkEnvVar REDIRECT_HTTP_ACCEPT “”
JkEnvVar REDIRECT_HTTP_USER_AGENT “”
JkEnvVar REDIRECT_REMOTE_ADDR “”
JkEnvVar REDIRECT_SERVER_NAME “”
JkEnvVar REDIRECT_SERVER_PORT “”
JkEnvVar REDIRECT_SERVER_SOFTWARE “”

Send every request for .cfm and .cfc files to tomcat

JkMount /.cfm worker1
JkMount /
.cfc worker1
JkMount /index.cfm/* worker1

These SES links do not work by default on tomcat :-/

#JkMount /.cfm/ worker1
#JkMount /.cfc/ worker1

Send every request for blazeDS to tomcat

JkMount /flashservices/gateway* worker1
JkMount /messagebroker* worker1
JkMount /flex2gateway* worker1
JkMount /openamf/gateway* worker1

This setting makes sure that the above JK settings are propagated into all virtual hosts

JkMountCopy All
---------------------end-------------------------

Content of my workers.properties (running on OSX):
--------------------start--------------------------
workers.tomcat_home=/usr/local/Cellar/tomcat/8.0.21
workers.java_home=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home

Define 1 real worker using ajp13

worker.list=worker1

Set properties for worker1 (ajp13)

worker.worker1.type=ajp13
worker.worker1.host=127.0.0.1
worker.worker1.port=8009
worker.worker1.socket_timeout=300
worker.worker1.ping_mode=A
ping_timeout=2000
connection_pool_timeout=50
---------------------end-------------------------

This was the only way I could get these redirect_* headers to work, and I have put about 4 full days of research in this.

Kind regards,

Paul Klinkenberg
lucee.nlOp 10 feb. 2015, om 19:46 heeft Gavin Pickin <@Gavin_Pickin> het volgende geschreven:

I think we’re confusing some important aspects of this problem… although I could be wrong, and I might be. :slight_smile:

Request Headers, Server Variables and Environment settings.

You set them and access them very differently… and it seems like Request Headers are being passed through, but only a limited set of CGI Environment Variables are.
I also found something that said the ProxyPass is sometimes called BEFORE other settings are created… which isn’t helpful… but lets hope what I found gets around that.

The other thing we are forgetting is, there are 2 requests happening, and I believe, the variables are overwriting themselves.