Enabling PATH_INFO on Nginx with Lucee

Hi list,

Though it might seem like a shameless plug for my blog post, it is not. I figured out today how to enable cgi.path_info while using nginx and Lucee, and wanted to share it with fellow nginx users.
For some reason, path_info doesn’t nativey transfer to (or picked up by?) Tomcat when proxying from nginx. I found a solution, which can be found here: http://www.lucee.nl/post.cfm/enable-path-info-on-nginx-with-lucee-and-railo http://www.lucee.nl/post.cfm/enable-path-info-on-nginx-with-lucee-and-railo

TLDR: use this config in bginx:

if the extension .cfm or .cfc is found, followed by a slash and optional extra

if ($uri ~ “^(.+?.cf[mc])(/.*)”) {
# remember the filepath without path_info
set $script $1;
# set the custom path_info header
proxy_set_header XAJP-PATH-INFO $2;
# rewrite the url to match the filepath wthout path_info
rewrite ^.+$ $script break;
}

Hope it helps anyone, kind regards,

Paul Klinkenberg

Oops, wrong copy-paste.
Here is the right one:

set $pathinfo “”;

if the extension .cfm or .cfc is found, followed by a slash and optional extra

if ($uri ~ “^(.+?.cf[mc])(/.*)”) {
# remember the filepath without path_info
set $script $1;
set $pathinfo $2;
# rewrite the url to match the filepath wthout path_info
rewrite ^.+$ $script break;
}

set the custom path_info header

proxy_set_header XAJP-PATH-INFO $pathinfo;

Kind regards,

Paul KlinkenbergOp 11 aug. 2015, om 14:59 heeft Paul Klinkenberg <@Paul_Klinkenberg> het volgende geschreven:

Hi list,

Though it might seem like a shameless plug for my blog post, it is not. I figured out today how to enable cgi.path_info while using nginx and Lucee, and wanted to share it with fellow nginx users.
For some reason, path_info doesn’t nativey transfer to (or picked up by?) Tomcat when proxying from nginx. I found a solution, which can be found here: http://www.lucee.nl/post.cfm/enable-path-info-on-nginx-with-lucee-and-railo http://www.lucee.nl/post.cfm/enable-path-info-on-nginx-with-lucee-and-railo

TLDR: use this config in bginx:

if the extension .cfm or .cfc is found, followed by a slash and optional extra

if ($uri ~ “^(.+?.cf[mc])(/.*)”) {
# remember the filepath without path_info
set $script $1;
# set the custom path_info header
proxy_set_header XAJP-PATH-INFO $2;
# rewrite the url to match the filepath wthout path_info
rewrite ^.+$ $script break;
}

Hope it helps anyone, kind regards,

Paul Klinkenberg


See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/ 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+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/9E24043F-7EB0-40AB-B673-D74C08817488%40ongevraagdadvies.nl https://groups.google.com/d/msgid/lucee/9E24043F-7EB0-40AB-B673-D74C08817488%40ongevraagdadvies.nl?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.

Hi Igal,

Well, using a regular proxy from nginx to tomcat 7 on ubuntu doesn’t work (for me?) if you have path_info in the url, eg. /test.cfm/something
I don’t seem to be the only one… https://www.google.com/search?q=path_info+nginx

Kind regards,

Paul

Paul,

why do you need that? I’ve been using nginx for a few years now and everything seems to work well without this. can you give a scenario where this is used?

thanks,

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/Op 11 aug. 2015, om 17:12 heeft Igal @ Lucee.org <@Igal> het volgende geschreven:
On 8/11/2015 6:27 AM, Paul Klinkenberg wrote:

Oops, wrong copy-paste.
Here is the right one:

set $pathinfo “”;

if the extension .cfm or .cfc is found, followed by a slash and optional extra

if ($uri ~ “^(.+?.cf[mc])(/.*)”) {
# remember the filepath without path_info
set $script $1;
set $pathinfo $2;
# rewrite the url to match the filepath wthout path_info
rewrite ^.+$ $script break;
}

set the custom path_info header

proxy_set_header XAJP-PATH-INFO $pathinfo;

Kind regards,

Paul Klinkenberg

Op 11 aug. 2015, om 14:59 heeft Paul Klinkenberg <@Paul_Klinkenberg mailto:Paul_Klinkenberg> het volgende geschreven:

Hi list,

Though it might seem like a shameless plug for my blog post, it is not. I figured out today how to enable cgi.path_info while using nginx and Lucee, and wanted to share it with fellow nginx users.
For some reason, path_info doesn’t nativey transfer to (or picked up by?) Tomcat when proxying from nginx. I found a solution, which can be found here: http://www.lucee.nl/post.cfm/enable-path-info-on-nginx-with-lucee-and-railohttp://www.lucee.nl/post.cfm/enable-path-info-on-nginx-with-lucee-and-railo http://www.lucee.nl/post.cfm/enable-path-info-on-nginx-with-lucee-and-railo

TLDR: use this config in bginx:

if the extension .cfm or .cfc is found, followed by a slash and optional extra

if ($uri ~ “^(.+?.cf[mc])(/.*)”) {
# remember the filepath without path_info
set $script $1;
# set the custom path_info header
proxy_set_header XAJP-PATH-INFO $2;
# rewrite the url to match the filepath wthout path_info
rewrite ^.+$ $script break;
}

Hope it helps anyone, kind regards,

Paul Klinkenberg


See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/ 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+unsubscribe@googlegroups.com mailto:lucee+unsubscribe@googlegroups.com.
To post to this group, send email to mailto:lucee@googlegroups.comlucee@googlegroups.com mailto:lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/9E24043F-7EB0-40AB-B673-D74C08817488%40ongevraagdadvies.nl?utm_medium=email&utm_source=footerhttps://groups.google.com/d/msgid/lucee/9E24043F-7EB0-40AB-B673-D74C08817488%40ongevraagdadvies.nl https://groups.google.com/d/msgid/lucee/9E24043F-7EB0-40AB-B673-D74C08817488%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.


See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/ 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+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/617F0C46-4141-4118-8B32-E9315F13B1A9%40ongevraagdadvies.nl?utm_medium=email&utm_source=footerhttps://groups.google.com/d/msgid/lucee/617F0C46-4141-4118-8B32-E9315F13B1A9%40ongevraagdadvies.nl https://groups.google.com/d/msgid/lucee/617F0C46-4141-4118-8B32-E9315F13B1A9%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.


See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/ 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+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/55CA10D0.9030702%40lucee.org https://groups.google.com/d/msgid/lucee/55CA10D0.9030702%40lucee.org?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout.

sorry 'bout that :wink:

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/On 8/11/2015 9:47 AM, Paul Klinkenberg wrote:

P.s. you got me sweating there for a moment Igal… Was I wrong? Is it
natively supported?
That would’ve been a waste of my time. Haha!

Kind regards,

Paul Klinkenberg


Op 11 aug. 2015 om 18:07 heeft Igal @ Lucee.org http://Lucee.org <@Igal mailto:Igal> het volgende geschreven:

I guess you’re right.

nginx has powerful URL-rewriting built in, and is rather simple to
configure, so I guess I used URL-rewriting and stopped using
CGI.PATH_INFO once I switched to nginx.

thanks for the info!

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/

On 8/11/2015 8:45 AM, Paul Klinkenberg wrote:

Hi Igal,

Well, using a regular proxy from nginx to tomcat 7 on ubuntu doesn’t
work (for me?) if you have path_info in the url, eg. /test.cfm/something
I don’t seem to be the only
one… https://www.google.com/search?q=path_info+nginx

Kind regards,

Paul

Op 11 aug. 2015, om 17:12 heeft Igal @ Lucee.org http://Lucee.org <@Igal mailto:Igal> het volgende geschreven:

Paul,

why do you need that? I’ve been using nginx for a few years now and
everything seems to work well without this. can you give a scenario
where this is used?

thanks,

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/

On 8/11/2015 6:27 AM, Paul Klinkenberg wrote:

Oops, wrong copy-paste.
Here is the right one:

set $pathinfo “”;

if the extension .cfm or .cfc is found, followed by a slash and

optional extra
if ($uri ~ “^(.+?.cf[mc])(/.*)”) {
# remember the filepath without path_info
set $script $1;
set $pathinfo $2;
# rewrite the url to match the filepath wthout path_info
rewrite ^.+$ $script break;
}

set the custom path_info header

proxy_set_header XAJP-PATH-INFO $pathinfo;

Kind regards,

Paul Klinkenberg

Op 11 aug. 2015, om 14:59 heeft Paul Klinkenberg
<@Paul_Klinkenberg mailto:Paul_Klinkenberg> het
volgende geschreven:

Hi list,

Though it might seem like a shameless plug for my blog post, it is
not. I figured out today how to enable cgi.path_info while using
nginx and Lucee, and wanted to share it with fellow nginx users.
For some reason, path_info doesn’t nativey transfer to (or picked
up by?) Tomcat when proxying from nginx. I found a solution, which
can be found
here: http://www.lucee.nl/post.cfm/enable-path-info-on-nginx-with-lucee-and-railo

TLDR: use this config in bginx:

if the extension .cfm or .cfc is found, followed by a slash and optional extra

if ($uri ~ “^(.+?.cf[mc])(/.*)”) {
# remember the filepath without path_info
set $script $1;
# set the custom path_info header
proxy_set_header XAJP-PATH-INFO $2;
# rewrite the url to match the filepath wthout path_info
rewrite ^.+$ $script break;
}

Hope it helps anyone, kind regards,

Paul Klinkenberg


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+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/9E24043F-7EB0-40AB-B673-D74C08817488%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com
mailto: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/617F0C46-4141-4118-8B32-E9315F13B1A9%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout.


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+unsubscribe@googlegroups.com
mailto: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/55CA10D0.9030702%40lucee.org.
For more options, visit https://groups.google.com/d/optout.


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+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/C392BEF7-7A1F-49E4-887E-24C970B401E4%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout.


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+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/55CA1DBC.8000309%40lucee.org
https://groups.google.com/d/msgid/lucee/55CA1DBC.8000309%40lucee.org?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

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+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/D04E3635-87DD-45B2-8836-04C291B09B01%40ongevraagdadvies.nl
https://groups.google.com/d/msgid/lucee/D04E3635-87DD-45B2-8836-04C291B09B01%40ongevraagdadvies.nl?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

Just curious, Paul: why not just use script_name (or path_translated, if you want the full path)? For every environment I’m aware of, script_name returns the same info as path_info - when path_info is even available. The only case where that might not work, that I can think of, is if you needed a symlinked path instead of the the resolved path that Tomcat uses.On August 11, 2015 at 11:46:01 AM, Paul Klinkenberg (@Paul_Klinkenberg) wrote:
Hi Igal,

Well, using a regular proxy from nginx to tomcat 7 on ubuntu doesn’t work (for me?) if you have path_info in the url, eg. /test.cfm/something
I don’t seem to be the only one… https://www.google.com/search?q=path_info+nginx

Kind regards,

Paul

Op 11 aug. 2015, om 17:12 heeft Igal @ Lucee.org <@Igal> het volgende geschreven:

Paul,

why do you need that? I’ve been using nginx for a few years now and everything seems to work well without this. can you give a scenario where this is used?

thanks,

Igal Sapir
Lucee Core Developer
Lucee.org

On 8/11/2015 6:27 AM, Paul Klinkenberg wrote:
Oops, wrong copy-paste.
Here is the right one:

set $pathinfo “”;

if the extension .cfm or .cfc is found, followed by a slash and optional extra

if ($uri ~ “^(.+?.cf[mc])(/.*)”) {
# remember the filepath without path_info
set $script $1;
set $pathinfo $2;
# rewrite the url to match the filepath wthout path_info
rewrite ^.+$ $script break;
}

set the custom path_info header

proxy_set_header XAJP-PATH-INFO $pathinfo;

Kind regards,

Paul Klinkenberg

Op 11 aug. 2015, om 14:59 heeft Paul Klinkenberg <@Paul_Klinkenberg> het volgende geschreven:

Hi list,

Though it might seem like a shameless plug for my blog post, it is not. I figured out today how to enable cgi.path_info while using nginx and Lucee, and wanted to share it with fellow nginx users.
For some reason, path_info doesn’t nativey transfer to (or picked up by?) Tomcat when proxying from nginx. I found a solution, which can be found here: http://www.lucee.nl/post.cfm/enable-path-info-on-nginx-with-lucee-and-railo

TLDR: use this config in bginx:

if the extension .cfm or .cfc is found, followed by a slash and optional extra

if ($uri ~ “^(.+?.cf[mc])(/.*)”) {
# remember the filepath without path_info
set $script $1;
# set the custom path_info header
proxy_set_header XAJP-PATH-INFO $2;
# rewrite the url to match the filepath wthout path_info
rewrite ^.+$ $script break;
}

Hope it helps anyone, kind regards,

Paul Klinkenberg


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+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/9E24043F-7EB0-40AB-B673-D74C08817488%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout.


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+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/617F0C46-4141-4118-8B32-E9315F13B1A9%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout.


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+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/55CA10D0.9030702%40lucee.org.
For more options, visit https://groups.google.com/d/optout.


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+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/C392BEF7-7A1F-49E4-887E-24C970B401E4%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout.

I guess you’re right.

nginx has powerful URL-rewriting built in, and is rather simple to
configure, so I guess I used URL-rewriting and stopped using
CGI.PATH_INFO once I switched to nginx.

thanks for the info!

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/On 8/11/2015 8:45 AM, Paul Klinkenberg wrote:

Hi Igal,

Well, using a regular proxy from nginx to tomcat 7 on ubuntu doesn’t
work (for me?) if you have path_info in the url, eg. /test.cfm/something
I don’t seem to be the only
one… https://www.google.com/search?q=path_info+nginx

Kind regards,

Paul

Op 11 aug. 2015, om 17:12 heeft Igal @ Lucee.org http://Lucee.org <@Igal mailto:Igal> het volgende geschreven:

Paul,

why do you need that? I’ve been using nginx for a few years now and
everything seems to work well without this. can you give a scenario
where this is used?

thanks,

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/

On 8/11/2015 6:27 AM, Paul Klinkenberg wrote:

Oops, wrong copy-paste.
Here is the right one:

set $pathinfo “”;

if the extension .cfm or .cfc is found, followed by a slash and

optional extra
if ($uri ~ “^(.+?.cf[mc])(/.*)”) {
# remember the filepath without path_info
set $script $1;
set $pathinfo $2;
# rewrite the url to match the filepath wthout path_info
rewrite ^.+$ $script break;
}

set the custom path_info header

proxy_set_header XAJP-PATH-INFO $pathinfo;

Kind regards,

Paul Klinkenberg

Op 11 aug. 2015, om 14:59 heeft Paul Klinkenberg
<@Paul_Klinkenberg mailto:Paul_Klinkenberg> het
volgende geschreven:

Hi list,

Though it might seem like a shameless plug for my blog post, it is
not. I figured out today how to enable cgi.path_info while using
nginx and Lucee, and wanted to share it with fellow nginx users.
For some reason, path_info doesn’t nativey transfer to (or picked up
by?) Tomcat when proxying from nginx. I found a solution, which can
be found
here: http://www.lucee.nl/post.cfm/enable-path-info-on-nginx-with-lucee-and-railo

TLDR: use this config in bginx:

if the extension .cfm or .cfc is found, followed by a slash and optional extra

if ($uri ~ “^(.+?.cf[mc])(/.*)”) {
# remember the filepath without path_info
set $script $1;
# set the custom path_info header
proxy_set_header XAJP-PATH-INFO $2;
# rewrite the url to match the filepath wthout path_info
rewrite ^.+$ $script break;
}

Hope it helps anyone, kind regards,

Paul Klinkenberg


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+unsubscribe@googlegroups.com
mailto: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/9E24043F-7EB0-40AB-B673-D74C08817488%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout.


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+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/617F0C46-4141-4118-8B32-E9315F13B1A9%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout.


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+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/55CA10D0.9030702%40lucee.org
https://groups.google.com/d/msgid/lucee/55CA10D0.9030702%40lucee.org?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.


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+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/C392BEF7-7A1F-49E4-887E-24C970B401E4%40ongevraagdadvies.nl
https://groups.google.com/d/msgid/lucee/C392BEF7-7A1F-49E4-887E-24C970B401E4%40ongevraagdadvies.nl?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

@Jon

PATH_INFO is not the same as SCRIPT_NAME, but it really is dependent on
your configurations. with standard config for:

 http://host/script-name.cfm/path-info

CGI.SCRIPT_NAME should return “/script-name.cfm” and CGI.PATH_INFO
should return “/path-info”

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/On 8/11/2015 9:29 AM, Jon Clausen wrote:

Just curious, Paul: why not just use script_name (or path_translated,
if you want the full path)? For every environment I’m aware of,
script_name returns the same info as path_info - when path_info is
even available. The only case where that might not work, that I can
think of, is if you needed a symlinked path instead of the the
resolved path that Tomcat uses.

On August 11, 2015 at 11:46:01 AM, Paul Klinkenberg (@Paul_Klinkenberg mailto:Paul_Klinkenberg) wrote:

Hi Igal,

Well, using a regular proxy from nginx to tomcat 7 on ubuntu doesn’t
work (for me?) if you have path_info in the url, eg. /test.cfm/something
I don’t seem to be the only
one… https://www.google.com/search?q=path_info+nginx

Kind regards,

Paul

Op 11 aug. 2015, om 17:12 heeft Igal @ Lucee.org http://Lucee.org <@Igal mailto:Igal> het volgende geschreven:

Paul,

why do you need that? I’ve been using nginx for a few years now and
everything seems to work well without this. can you give a scenario
where this is used?

thanks,

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/

On 8/11/2015 6:27 AM, Paul Klinkenberg wrote:

Oops, wrong copy-paste.
Here is the right one:

set $pathinfo “”;

if the extension .cfm or .cfc is found, followed by a slash and

optional extra
if ($uri ~ “^(.+?.cf[mc])(/.*)”) {
# remember the filepath without path_info
set $script $1;
set $pathinfo $2;
# rewrite the url to match the filepath wthout path_info
rewrite ^.+$ $script break;
}

set the custom path_info header

proxy_set_header XAJP-PATH-INFO $pathinfo;

Kind regards,

Paul Klinkenberg

Op 11 aug. 2015, om 14:59 heeft Paul Klinkenberg
<@Paul_Klinkenberg mailto:Paul_Klinkenberg> het
volgende geschreven:

Hi list,

Though it might seem like a shameless plug for my blog post, it is
not. I figured out today how to enable cgi.path_info while using
nginx and Lucee, and wanted to share it with fellow nginx users.
For some reason, path_info doesn’t nativey transfer to (or picked up
by?) Tomcat when proxying from nginx. I found a solution, which can
be found
here: http://www.lucee.nl/post.cfm/enable-path-info-on-nginx-with-lucee-and-railo

TLDR: use this config in bginx:

if the extension .cfm or .cfc is found, followed by a slash and optional extra

if ($uri ~ “^(.+?.cf[mc])(/.*)”) {
# remember the filepath without path_info
set $script $1;
# set the custom path_info header
proxy_set_header XAJP-PATH-INFO $2;
# rewrite the url to match the filepath wthout path_info
rewrite ^.+$ $script break;
}

Hope it helps anyone, kind regards,

Paul Klinkenberg


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+unsubscribe@googlegroups.com
mailto: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/9E24043F-7EB0-40AB-B673-D74C08817488%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout.


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+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/617F0C46-4141-4118-8B32-E9315F13B1A9%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout.


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+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/55CA10D0.9030702%40lucee.org
https://groups.google.com/d/msgid/lucee/55CA10D0.9030702%40lucee.org?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.


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+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/C392BEF7-7A1F-49E4-887E-24C970B401E4%40ongevraagdadvies.nl
https://groups.google.com/d/msgid/lucee/C392BEF7-7A1F-49E4-887E-24C970B401E4%40ongevraagdadvies.nl?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

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+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/etPan.55ca2302.5904f4fd.1114%40jonclausen-mbp.local
https://groups.google.com/d/msgid/lucee/etPan.55ca2302.5904f4fd.1114%40jonclausen-mbp.local?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

Paul,

why do you need that? I’ve been using nginx for a few years now and
everything seems to work well without this. can you give a scenario
where this is used?

thanks,

Igal Sapir
Lucee Core Developer
Lucee.org http://lucee.org/On 8/11/2015 6:27 AM, Paul Klinkenberg wrote:

Oops, wrong copy-paste.
Here is the right one:

set $pathinfo “”;

if the extension .cfm or .cfc is found, followed by a slash and

optional extra
if ($uri ~ “^(.+?.cf[mc])(/.*)”) {
# remember the filepath without path_info
set $script $1;
set $pathinfo $2;
# rewrite the url to match the filepath wthout path_info
rewrite ^.+$ $script break;
}

set the custom path_info header

proxy_set_header XAJP-PATH-INFO $pathinfo;

Kind regards,

Paul Klinkenberg

Op 11 aug. 2015, om 14:59 heeft Paul Klinkenberg
<@Paul_Klinkenberg mailto:Paul_Klinkenberg> het
volgende geschreven:

Hi list,

Though it might seem like a shameless plug for my blog post, it is
not. I figured out today how to enable cgi.path_info while using nginx
and Lucee, and wanted to share it with fellow nginx users.
For some reason, path_info doesn’t nativey transfer to (or picked up
by?) Tomcat when proxying from nginx. I found a solution, which can be
found
here: http://www.lucee.nl/post.cfm/enable-path-info-on-nginx-with-lucee-and-railo

TLDR: use this config in bginx:

if the extension .cfm or .cfc is found, followed by a slash and optional extra

if ($uri ~ “^(.+?.cf[mc])(/.*)”) {
# remember the filepath without path_info
set $script $1;
# set the custom path_info header
proxy_set_header XAJP-PATH-INFO $2;
# rewrite the url to match the filepath wthout path_info
rewrite ^.+$ $script break;
}

Hope it helps anyone, kind regards,

Paul Klinkenberg


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+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/9E24043F-7EB0-40AB-B673-D74C08817488%40ongevraagdadvies.nl
https://groups.google.com/d/msgid/lucee/9E24043F-7EB0-40AB-B673-D74C08817488%40ongevraagdadvies.nl?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.


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+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/617F0C46-4141-4118-8B32-E9315F13B1A9%40ongevraagdadvies.nl
https://groups.google.com/d/msgid/lucee/617F0C46-4141-4118-8B32-E9315F13B1A9%40ongevraagdadvies.nl?utm_medium=email&utm_source=footer.
For more options, visit https://groups.google.com/d/optout.

P.s. you got me sweating there for a moment Igal… Was I wrong? Is it natively supported?
That would’ve been a waste of my time. Haha!

Kind regards,

Paul Klinkenberg------------

Op 11 aug. 2015 om 18:07 heeft Igal @ Lucee.org <@Igal> het volgende geschreven:

I guess you’re right.

nginx has powerful URL-rewriting built in, and is rather simple to configure, so I guess I used URL-rewriting and stopped using CGI.PATH_INFO once I switched to nginx.

thanks for the info!

Igal Sapir
Lucee Core Developer
Lucee.org

On 8/11/2015 8:45 AM, Paul Klinkenberg wrote:
Hi Igal,

Well, using a regular proxy from nginx to tomcat 7 on ubuntu doesn’t work (for me?) if you have path_info in the url, eg. /test.cfm/something
I don’t seem to be the only one… https://www.google.com/search?q=path_info+nginx

Kind regards,

Paul

Op 11 aug. 2015, om 17:12 heeft Igal @ Lucee.org <@Igal> het volgende geschreven:

Paul,

why do you need that? I’ve been using nginx for a few years now and everything seems to work well without this. can you give a scenario where this is used?

thanks,

Igal Sapir
Lucee Core Developer
Lucee.org

On 8/11/2015 6:27 AM, Paul Klinkenberg wrote:
Oops, wrong copy-paste.
Here is the right one:

set $pathinfo “”;

if the extension .cfm or .cfc is found, followed by a slash and optional extra

if ($uri ~ “^(.+?.cf[mc])(/.*)”) {
# remember the filepath without path_info
set $script $1;
set $pathinfo $2;
# rewrite the url to match the filepath wthout path_info
rewrite ^.+$ $script break;
}

set the custom path_info header

proxy_set_header XAJP-PATH-INFO $pathinfo;

Kind regards,

Paul Klinkenberg

Op 11 aug. 2015, om 14:59 heeft Paul Klinkenberg <@Paul_Klinkenberg> het volgende geschreven:

Hi list,

Though it might seem like a shameless plug for my blog post, it is not. I figured out today how to enable cgi.path_info while using nginx and Lucee, and wanted to share it with fellow nginx users.
For some reason, path_info doesn’t nativey transfer to (or picked up by?) Tomcat when proxying from nginx. I found a solution, which can be found here: http://www.lucee.nl/post.cfm/enable-path-info-on-nginx-with-lucee-and-railo

TLDR: use this config in bginx:

if the extension .cfm or .cfc is found, followed by a slash and optional extra

if ($uri ~ “^(.+?.cf[mc])(/.*)”) {
# remember the filepath without path_info
set $script $1;
# set the custom path_info header
proxy_set_header XAJP-PATH-INFO $2;
# rewrite the url to match the filepath wthout path_info
rewrite ^.+$ $script break;
}

Hope it helps anyone, kind regards,

Paul Klinkenberg


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+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/9E24043F-7EB0-40AB-B673-D74C08817488%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout.


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+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/617F0C46-4141-4118-8B32-E9315F13B1A9%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout.


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+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/55CA10D0.9030702%40lucee.org.
For more options, visit https://groups.google.com/d/optout.


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+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/C392BEF7-7A1F-49E4-887E-24C970B401E4%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout.


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+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/55CA1DBC.8000309%40lucee.org.
For more options, visit https://groups.google.com/d/optout.

Hi Jon, Igal,

I host a number of sites which are dependent on cgi.path_info, and changing the source code to be able to use a rewrite at the frontend isn’t an option; it’s not all my code.
I know doing a rewrite is the regular way to get around this problem.

We solved this same problem with mod_cfml by the way, for IIS and Apache.

Kind regards,

Paul Klinkenberg------------

Op 11 aug. 2015 om 18:34 heeft Igal @ Lucee.org <@Igal> het volgende geschreven:

@Jon

PATH_INFO is not the same as SCRIPT_NAME, but it really is dependent on your configurations. with standard config for:

 http://host/script-name.cfm/path-info

CGI.SCRIPT_NAME should return “/script-name.cfm” and CGI.PATH_INFO should return “/path-info”

Igal Sapir
Lucee Core Developer
Lucee.org

On 8/11/2015 9:29 AM, Jon Clausen wrote:
Just curious, Paul: why not just use script_name (or path_translated, if you want the full path)? For every environment I’m aware of, script_name returns the same info as path_info - when path_info is even available. The only case where that might not work, that I can think of, is if you needed a symlinked path instead of the the resolved path that Tomcat uses.

On August 11, 2015 at 11:46:01 AM, Paul Klinkenberg (@Paul_Klinkenberg) wrote:
Hi Igal,

Well, using a regular proxy from nginx to tomcat 7 on ubuntu doesn’t work (for me?) if you have path_info in the url, eg. /test.cfm/something
I don’t seem to be the only one… https://www.google.com/search?q=path_info+nginx

Kind regards,

Paul

Op 11 aug. 2015, om 17:12 heeft Igal @ Lucee.org <@Igal> het volgende geschreven:

Paul,

why do you need that? I’ve been using nginx for a few years now and everything seems to work well without this. can you give a scenario where this is used?

thanks,

Igal Sapir
Lucee Core Developer
Lucee.org

On 8/11/2015 6:27 AM, Paul Klinkenberg wrote:
Oops, wrong copy-paste.
Here is the right one:

set $pathinfo “”;

if the extension .cfm or .cfc is found, followed by a slash and optional extra

if ($uri ~ “^(.+?.cf[mc])(/.*)”) {
# remember the filepath without path_info
set $script $1;
set $pathinfo $2;
# rewrite the url to match the filepath wthout path_info
rewrite ^.+$ $script break;
}

set the custom path_info header

proxy_set_header XAJP-PATH-INFO $pathinfo;

Kind regards,

Paul Klinkenberg

Op 11 aug. 2015, om 14:59 heeft Paul Klinkenberg <@Paul_Klinkenberg> het volgende geschreven:

Hi list,

Though it might seem like a shameless plug for my blog post, it is not. I figured out today how to enable cgi.path_info while using nginx and Lucee, and wanted to share it with fellow nginx users.
For some reason, path_info doesn’t nativey transfer to (or picked up by?) Tomcat when proxying from nginx. I found a solution, which can be found here: http://www.lucee.nl/post.cfm/enable-path-info-on-nginx-with-lucee-and-railo

TLDR: use this config in bginx:

if the extension .cfm or .cfc is found, followed by a slash and optional extra

if ($uri ~ “^(.+?.cf[mc])(/.*)”) {
# remember the filepath without path_info
set $script $1;
# set the custom path_info header
proxy_set_header XAJP-PATH-INFO $2;
# rewrite the url to match the filepath wthout path_info
rewrite ^.+$ $script break;
}

Hope it helps anyone, kind regards,

Paul Klinkenberg


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+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/9E24043F-7EB0-40AB-B673-D74C08817488%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout.


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+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/617F0C46-4141-4118-8B32-E9315F13B1A9%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout.


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+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/55CA10D0.9030702%40lucee.org.
For more options, visit https://groups.google.com/d/optout.


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+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/C392BEF7-7A1F-49E4-887E-24C970B401E4%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout.

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+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/etPan.55ca2302.5904f4fd.1114%40jonclausen-mbp.local.
For more options, visit https://groups.google.com/d/optout.


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+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/55CA2403.6050601%40lucee.org.
For more options, visit https://groups.google.com/d/optout.

Ah, sorry Igal (and Paul), you’re right. My bad. I’ve gotten rusty on my CGI variables using frameworks to do all of that under the hood. Ugh.On August 11, 2015 at 12:46:13 PM, Paul Klinkenberg (@Paul_Klinkenberg) wrote:

Hi Jon, Igal,

I host a number of sites which are dependent on cgi.path_info, and changing the source code to be able to use a rewrite at the frontend isn’t an option; it’s not all my code.
I know doing a rewrite is the regular way to get around this problem.

We solved this same problem with mod_cfml by the way, for IIS and Apache.

Kind regards,

Paul Klinkenberg


Op 11 aug. 2015 om 18:34 heeft Igal @ Lucee.org <@Igal> het volgende geschreven:

@Jon

PATH_INFO is not the same as SCRIPT_NAME, but it really is dependent on your configurations. with standard config for:

 http://host/script-name.cfm/path-info

CGI.SCRIPT_NAME should return “/script-name.cfm” and CGI.PATH_INFO should return “/path-info”

Igal Sapir
Lucee Core Developer
Lucee.org

On 8/11/2015 9:29 AM, Jon Clausen wrote:
Just curious, Paul: why not just use script_name (or path_translated, if you want the full path)? For every environment I’m aware of, script_name returns the same info as path_info - when path_info is even available. The only case where that might not work, that I can think of, is if you needed a symlinked path instead of the the resolved path that Tomcat uses.

On August 11, 2015 at 11:46:01 AM, Paul Klinkenberg (@Paul_Klinkenberg) wrote:
Hi Igal,

Well, using a regular proxy from nginx to tomcat 7 on ubuntu doesn’t work (for me?) if you have path_info in the url, eg. /test.cfm/something
I don’t seem to be the only one… https://www.google.com/search?q=path_info+nginx

Kind regards,

Paul

Op 11 aug. 2015, om 17:12 heeft Igal @ Lucee.org <@Igal> het volgende geschreven:

Paul,

why do you need that? I’ve been using nginx for a few years now and everything seems to work well without this. can you give a scenario where this is used?

thanks,

Igal Sapir
Lucee Core Developer
Lucee.org

On 8/11/2015 6:27 AM, Paul Klinkenberg wrote:
Oops, wrong copy-paste.
Here is the right one:

set $pathinfo “”;

if the extension .cfm or .cfc is found, followed by a slash and optional extra

if ($uri ~ “^(.+?.cf[mc])(/.*)”) {
# remember the filepath without path_info
set $script $1;
set $pathinfo $2;
# rewrite the url to match the filepath wthout path_info
rewrite ^.+$ $script break;
}

set the custom path_info header

proxy_set_header XAJP-PATH-INFO $pathinfo;

Kind regards,

Paul Klinkenberg

Op 11 aug. 2015, om 14:59 heeft Paul Klinkenberg <@Paul_Klinkenberg> het volgende geschreven:

Hi list,

Though it might seem like a shameless plug for my blog post, it is not. I figured out today how to enable cgi.path_info while using nginx and Lucee, and wanted to share it with fellow nginx users.
For some reason, path_info doesn’t nativey transfer to (or picked up by?) Tomcat when proxying from nginx. I found a solution, which can be found here: http://www.lucee.nl/post.cfm/enable-path-info-on-nginx-with-lucee-and-railo

TLDR: use this config in bginx:

if the extension .cfm or .cfc is found, followed by a slash and optional extra

if ($uri ~ “^(.+?.cf[mc])(/.*)”) {
# remember the filepath without path_info
set $script $1;
# set the custom path_info header
proxy_set_header XAJP-PATH-INFO $2;
# rewrite the url to match the filepath wthout path_info
rewrite ^.+$ $script break;
}

Hope it helps anyone, kind regards,

Paul Klinkenberg


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+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/9E24043F-7EB0-40AB-B673-D74C08817488%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout.


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+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/617F0C46-4141-4118-8B32-E9315F13B1A9%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout.


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+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/55CA10D0.9030702%40lucee.org.
For more options, visit https://groups.google.com/d/optout.


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+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/C392BEF7-7A1F-49E4-887E-24C970B401E4%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout.

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+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/etPan.55ca2302.5904f4fd.1114%40jonclausen-mbp.local.
For more options, visit https://groups.google.com/d/optout.


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+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/55CA2403.6050601%40lucee.org.
For more options, visit https://groups.google.com/d/optout.

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+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/0662863E-2A70-40E2-A053-1AF4A623D5B5%40ongevraagdadvies.nl.
For more options, visit https://groups.google.com/d/optout.