--
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/f76fb15c-d9b3-461a-b3d4-8bc2a1150b8d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/d64ba1fb-a7f1-4520-8b97-9e6218e91a78%40googlegroups.com.
Andy,
I had some similar issues when setting up a Docker composition with Lucee/NGINX. A few tweaks to the regex Andy wrote (specifically the preceeding slash in the index.cfm
rewrite directive), resolved the issue:
location / {
# First attempt to serve real files or directory, else it sends it to the @rewrite location for processing
try_files $uri $uri/ @rewrite;
}
location @rewrite {
rewrite ^(.*)? /index.cfm$uri last;
rewrite ^ /index.cfm last;
}
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/d64ba1fb-a7f1-4520-8b97-9e6218e91a78%40googlegroups.com.
server { listen 80; server_name example.com; root /var/www/ufoundmytag/www/; set $lucee_context "example.com";
location / { # First attempt to serve real files or directory, else it sends it to the @rewrite location for processing try_files $uri $uri/ @rewrite; }
location @rewrite { rewrite ^(.*)? /index.cfm$uri last; rewrite ^ /index.cfm last; }
include lucee.conf;}
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/031fbf3d-a6d5-4d19-9809-9457396039f4%40googlegroups.com.
Oops. Hit send on that last empty response by mistake? Is your Lucee port correct? My install uses 8888 (from lucee.conf):
location ~ \.(cfm|cfml|cfc|jsp)(.*)$ {
proxy_pass http://luceehost: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;
}
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/031fbf3d-a6d5-4d19-9809-9457396039f4%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/gUt7jedl-Sk/unsubscribe.
To unsubscribe from this group and all its topics, 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/etPan.57430038.5f328f8d.501%40jonclausen-mbp.local.
location @rewrites {
rewrite ^(.*)$ /index.cfm$1 last;
}
location / {
try_files $uri $uri/ /index.cfm$request_uri;
}
proxy_pass http://127.0.0.1:8080;#include standard proxy headersproxy_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 {} blockproxy_set_header https $cgi_https;
#add headers for mod_cfml to do its workproxy_set_header X-Tomcat-DocRoot $document_root;proxy_set_header X-ModCFML-SharedKey vfV1yfu7SXpiLozh77tQq6JEU1lUyOFZCRy8KnxnQoGGoS9o23aV5Mu;# 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-railoset $pathinfo "";# if the extension .cfm or .cfc is found, followed by a slash and optional extraif ($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 headerproxy_set_header XAJP-PATH-INFO $pathinfo;
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;
root /var/www/example.com/www/; set $lucee_context "example.com";
location / { try_files $uri $uri/ @rewrites; }
location @rewrites {
rewrite ^ /index.cfm last; }
include lucee.conf;}
--
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/6995c6a5-ec1e-4d5f-b611-82018e7de8c4%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/gUt7jedl-Sk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAADZ8V76QKfsJ9MOSE8M_s8jO6zBJ2zyidaQWeM0-DTZ2pHZAA%40mail.gmail.com.
server { listen 80; server_name example.com; root /var/www/example.com/www/; set $lucee_context "example.com";
location / {
include lucee-proxy.conf;
try_files $uri $uri/ @rewrite; }
location @rewrite {
rewrite ^ /index.cfm last; }
}
server {
listen 80;
server_name example.com;
root /var/www/example.com/www/;
index index.cfm;
# Rewrite rules and other criterias can go here
# Remember to avoid using if() where possible (http://wiki.nginx.org/IfIsEvil)
try_files $uri $uri/ @rewrites;
}
# This block will catch static file requests, such as images, css, js
# The ?: prefix is a 'non-capturing' mark, meaning we do not require
# the pattern to be captured into $1 which should help improve performance
location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
# Some basic cache-control for static files to be sent to the browser
expires max;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}
location @rewrites {
# Can put some of your own rewrite rules in here
# for example rewrite ^/~(.*)/(.*)/? /users/$1/$2 last;
rewrite ^/(.*)? /index.cfm/$1 last;
}
# Main Lucee proxy handler
location ~ \.(cfm|cfml|cfc|jsp|cfr)(.*)$ {
proxy_pass http://127.0.0.1:8080;
proxy_read_timeout 100s;
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 X-Forwarded-Proto $scheme;
proxy_set_header https $cgi_https;
proxy_set_header X-Tomcat-DocRoot $document_root;
proxy_set_header X-ModCFML-SharedKey 8DoB0PzqdMn4zo0Y2bq7dzqynbqBVsK0piuNslpNU6982KaiCqVT8X;
proxy_set_header X-Webserver-Context $lucee_context;
proxy_set_header XAJP-PATH-INFO $pathinfo;
}
}