Permalink
Find file
2f6c87c Oct 26, 2015
@paulklinkenberg @pfreitag @mvanleest
31 lines (28 sloc) 1.24 KB
proxy_pass http://127.0.0.1:8080;
#include standard proxy headers
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
#populate the cgi.https variable with on or off based on map condition which must be specified in a http {} block
proxy_set_header https $cgi_https;
#add headers for mod_cfml to do its work
proxy_set_header X-Tomcat-DocRoot $document_root;
proxy_set_header X-ModCFML-SharedKey SHARED-KEY-HERE;
# For more info on $lucee_context, see http://www.modcfml.org/index.cfm/install/web-server-components/nginx-all-os/
if ($lucee_context = false) {
set $lucee_context $document_root;
}
proxy_set_header X-Webserver-Context $lucee_context;
# Enable path_info - http://www.lucee.nl/post.cfm/enable-path-info-on-nginx-with-lucee-and-railo
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;