component {
writeOutput('cgi "path info"<br>');
writeDump(cgi.path_info);
abort;
}
server {
listen 80 default_server;
server_name _;
index index.cfm index.html index.htm;
root /var/www;
server_name_in_redirect off;
set $path_info "";
#test url: http://192.168.99.100/how-it-works
#attempt1 -> server 404 not found
#if (!-e $request_filename){
#rewrite ^(.*)$ /index.cfm/$1 break;
#}
#attempt2 -> loads index.cfm file, CGI path_info is blank
#location / {
#try_files $uri /index.cfm$1;
#}
#attempt3 (server 500 error)
#try_files $uri /index.cfm/$args;
#attempt4
#if (!-e $request_filename){
#try_files $uri /index.cfm$args;
#set $path_info $args;
#}
#attempt5 > 404 not found
#rewrite ^(.*)$ /index.cfm$1;
#set $path_info $1;
#attempt6 > 404 not found
#rewrite ^(.*)$ /index.cfm$1 break;
#set $path_info $1;
#attempt7 > loading index.cfm file but not passing $path_info
#if ($uri ~ "^(.+.cfm)(/.+)") {
#set $path_info $2;
#}
#try_files $uri /index.cfm$args;
try_files $uri /index.cfm$args;
# 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 $path_info $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 $path_info;
location ~* \.(cfm|cfc|cfr)$ {
proxy_pass http://127.0.0.1:8888;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
}
}
if connecting to Tomcat, use Tomcat's RemoteIpValve to resolve CGI.REMOTE_ADDR, CGI.SERVER_NAME, and CGI.SERVER_PORT_SECURE
<Valve className="org.apache.catalina.valves.RemoteIpValve" protocolHeader="X-Forwarded-Proto" remoteIpHeader="X-Forwarded-For" protocolHeaderHttpsValue="https" />
--
Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/891fc7df-8c27-496c-8a20-77a9239e5706%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Igal Sapir
Lucee Core Developer
Lucee.org
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAGHrs%3D-o96qO9UChc7t1PXR_G3RHwY9fAK_9XhEKQa-Ez7sDLA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/56C8A94B.1070502%40lucee.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/etPan.56c8ab83.6964d63a.b3a1%40jonclausen-mbp.local.
server {
listen 80 default_server; server_name _; index index.cfm index.html index.htm; root /var/www; server_name_in_redirect off;
set $path_info $request_uri;
try_files $uri /index.cfm$args;
location ~* \.(cfm|cfc|cfr)$ { proxy_pass http://127.0.0.1:8888; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr;
proxy_set_header XAJP-PATH-INFO $path_info;
proxy_connect_timeout 600; proxy_send_timeout 600; proxy_read_timeout 600; send_timeout 600; }
}
...
...
...
I am really pleased to be migrating this application to Lucee (on Docker) and running it in Amazon AWS (EC2 Container Engine), or Google Container Engine, or Digital Ocean. You guys are really great and I'm amped for the great future I know Lucee holds.