Nginx rule for subdomains: ERR_TOO_MANY_REDIRECTS

Igal @ igal at
Fri Jun 9 16:46:57 UTC 2017


On 6/9/2017 12:11 AM, Francis Daly wrote:
> On Thu, Jun 08, 2017 at 03:59:19AM -0400, iivan wrote:
>> Here's the full configuration file:
> That shows that the "if/rewrite" that you showed previously is within
> "location / {}", and it rewrites to /index.cfm.
> What part of your config shows how nginx should handle a request for
> /index.cfm?

I think that that's the issue.  You need to add something like

## this will not check for regular expression locations for uris that 
start with "/index.cfm"
location ^~  /index.cfm {
     ## proxy request to Lucee here

Without this, requests to "anything" redirect to /index.cfm, but then 
the redirect to /index.cfm again matches "anything", so it redirects 
again to /index.cfm in an infinite loop which will show on the browser 


More information about the nginx mailing list