Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
30 lines (28 sloc) 1.24 KB
#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
if ($lucee_context = false) {
set $lucee_context $document_root;
proxy_set_header X-Webserver-Context $lucee_context;
# Enable path_info -
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;