Windows: localhost not working, 127.0.0.1 is fine

Have an AWS EC2 instance running Windows Server 2022. Followed the Windows installation instructions in the Lucee docs/videos.

My test file works fine at 127.0.0.1/index.cfm but when I go to localhost/index.cfm I get ERR_TOO_MANY_REDIRECTS with the browser address as follows:

http://localhost/index.cfm?&_&_&_&_&_&_&_&_&_&_&_&_&_&_&_&_&_&_&_

This seems to be the opposite issue many people have had where localhost is fine and 127.0.0.1 doesn’t work. The ampersands and underscores just keep getting added to the URL.

Any help is appreciated!

Looks like the mod_cfml module isn’t able to create the web context configuration. What may work is to copy the context configuration folder manually from c:\path-to-lucee-installation\tomcat\config\catalina\127.0.0.1 and paste it, then rename the copied directory to localhost at c:\path-to-lucee-installation\tomcat\config\catalina\localhost. Then restart tomcat. Please post back if that works or not.

Thanks for the response, Andreas.

There is no c:\path-to-lucee-installation\tomcat\config\catalina\127.0.0.1 folder. There is, however, already a c:\path-to-lucee-installation\tomcat\config\catalina\localhost folder. Not sure where that leads us next.

I’m also having problems with serving a site from IIS. I just get a blank page. I’m using Lucee 5.3.10.120 … maybe I should try an earlier version?

Thanks!

The localhost issue through IIS is an issue with mod_,cfml. Please see [LDEV-3706] - Lucee

I didn’t had the time to look closer into it, and I am (and going to be) away from my laptop for a while. I know you can make it work by deactivating mod_cfml and adding context manually, but I don’t know if you would want to deactivate mod_,cfml.

The ‘blank’ site is probably something else.