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;
}On May 23, 2016 at 8:16:44 AM, Andy Jarrett (@Andy_Jarrett) wrote:
Ok, looking at this a bit more and I got confused - A quick update and I am now getting a 500 error which looks like its a problem with the Nginx rewrite.
I’ve added
location / {
try_files $uri $uri/ @rewrites;
}
location @rewrites {
Can put some of your own rewrite rules in here
for example rewrite ^/~(.)/(.)/? /users/$1/$2 last;
rewrite ^/(.*)? /index.cfm/$1 last;
rewrite ^ /index.cfm last;
}
And I now get
2016/05/23 13:07:44 [error] 3054#0: *2 rewrite or internal redirection cycle while redirect to named location “@rewrites”, client: 172.16.20.1, server: example.com, request: “GET /security HTTP/1.1”, host: “example.com”
2016/05/23 13:11:10 [error] 3054#0: *4 rewrite or internal redirection cycle while redirect to named location “@rewrites”, client: 172.16.20.1, server: example.com, request: “GET /index.cfm/security HTTP/1.1”, host: “example.com”
hmmmm … still confused by this one.
On Monday, May 23, 2016 at 12:39:55 PM UTC+1, Nando Breiter wrote:
You say that Pete’s script already “covers” rewrite rules for Nginx / FW/1? Can you be more explicit regarding the rewrite rules you’ve included in your Nginx config?
There’s some information about rewriting urls for FW/1 here: Helpful Links · framework-one/fw1 Wiki · GitHub
Aria Media Sagl
+41 (0)76 303 4477 cell
skype: ariamedia
On Mon, May 23, 2016 at 12:35 PM, Andy Jarrett ma...@andyjarrett.co.uk wrote:
Hi all
Stuck on a setup issue after I have installed Lucee and Nginx using Pete Freitag’s script. I can browse to http://example.com/index.cfm and everything works fine.
I then added my FW/1 app and tried going to a few routes and Nginx is throwing 404 messages. I’ve tried http://example.com/security and http://example.com/index.cfm/security are both the same. I’ve had a google looking at issues relating to CGI.PATH_INFO and Rewrite rules but the Pete’s script covers these already.
When I look in the logs this is what I see when I try different combinations of the same route:
2016/05/23 10:34:12 [error] 10363#10363: *9 open() “/var/www/example.com/www/security” failed (2: No such file or directory), client: 82.17.13.119, server: example.com, request: “GET /security HTTP/1.1”, host: “example.com”
2016/05/23 10:34:20 [error] 10363#10363: *9 open() “/var/www/example.com/www/index.cfm/security” failed (20: Not a directory), client: 82.17.13.119, server: example.com, request: “GET /index.cfm/security HTTP/1.1”, host: “example.com”
2016/05/23 10:34:23 [error] 10363#10363: *9 “/var/www/example.com/www/index.cfm/security/index.html” is not found (20: Not a directory), client: 82.17.13.119, server: example.com, request: “GET /index.cfm/security/ HTTP/1.1”, host: “example.com”
Any help appreciated.
Andy J
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.
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+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/d64ba1fb-a7f1-4520-8b97-9e6218e91a78%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.