nginx.conf: Reverse Proxy to a CF Engine
server {
################### SERVER NAME AND PORT #####################
server_name cfswarm-simple.localtest.me;
listen 80;
# listen 443 ssl http2;
index index.cfm index.cfml index.htm index.html;
resolver 127.0.0.11 valid=30s; # docker DNS daemon
set $cfml_host cfswarm-cfml; # this causes nginx to be OK if the host isn't up
root "/var/www/app-one";
include inc_lockdown.conf;
################### LOCATION: ROOT #####################
include inc_locationRewrites.conf;
location ~* \.(jpg|jpeg|png|gif|ico|txt|woff|woff2|ttf)$ {
expires 30d;
}
location ~* \.(css|js)$ {
expires 7d;
}
################### CFML HANDLER #####################
location ~ (\.cfm|\.cfml|\.cfc|\.jsp|\.cfr|flex2gateway|messagebroker|flashservices|openamf)(.*)$ {
proxy_pass http://$cfml_host:8080;
set $lucee_context $server_name;
include inc_lucee-proxy.conf;
}
}location ~ / proxy_pass
resolver
Upstream proxy variable (set $cmfl_host)
Common includes (inc_lockdown.conf, inc_locationRewrites.conf)
location (CSS, JPG, Other Static Assets)
Last updated