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
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
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: Enable PATH_INFO on Nginx with Lucee and Railo » Lucee Developer
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/
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/
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.