Port 80 does not work with IIS Connector

My system:
New machine with new install of Windows 10 Pro
Installed IIS, works ok
Installed Lucee Lucee 5.3.7.34-RC with the IIS connector. My ColdFusion code works fine on port 8888
Java: 11.0.7 (AdoptOpenJDK) 64bit
Apache Tomcat/9.0.35

If I try anything on port 80 I get error redirected you too many times.
Example:
http://127.0.0.1:8888/test.cfm works fine

http://127.0.0.1/test.cfm gives: 127.0.0.1 redirected you too many times and shows
http://127.0.0.1/test.cfm?&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__
in the url.
HELP!

Don’t forget to tell us about your stack!

OS: ???
Java Version: ???
Tomcat Version: ???
Lucee Version: ???

Hi Paul, welcome to our community.

I’ve seen this happening somewhere before. Did you try accessing ithe pages through http://localhost/test.cfm rather than over the IP address? Take a look into the following post, it might help you figure out your issue:

https://lucee.daemonite.io/t/default-doc-going-in-circles-on-127-0-0-1/7049

Thank you so much Andreas for your prompt answer.
Yes, to my amazement localhost instead of 127.0.0.1 works.
The post you mention does not provide a solution: two guys simply finding the same bug but not giving a solution. One of them gives an idea which does not work.
I believe the Lucee team should fix this as it is very frustrating and an incredible waste of time for the users.
I spent three days trying to figure out what was wrong with my system as I absolutely need to use IIS and not Apache.
Please, fix this in the install procedure or give instructions on how to edit the configuration after installing so this bug does not happen.
Thanks again for your help and thanks to the Lucee team: you did something wonderful!

1 Like

Paul,

This is not a Lucee issue, it’s a tomcat issue. It happens when the context can’t be created in tomcat for whatever reason. In most cases it can be fixed with a simple Tomcat restart. Have you tried restarting Lucee/Tomcat yet?

If simply restarting Tomcat doesn’t fix it, there’s usually a significant error showing up in the Tomcat catalina log file. Check c:/lucee/tomcat/logs/

-JM

1 Like

Thanks a lot for your answer.

Yes, I have restarted Tomcat and/or Lucee multiple times. Same result.

I just tried again 127.0.0.1/test.cfm. (test.cfm simply prints “TEST”) fails as before.

This is what I get in the log file localhost_access_log.2020-08-14.txt:

127.0.0.1 - - [14/Aug/2020:13:12:27 -0700] “GET /test.cfm HTTP/1.1” 307 -

127.0.0.1 - - [14/Aug/2020:13:12:30 -0700] “GET /test.cfm?&__ HTTP/1.1” 307 -

127.0.0.1 - - [14/Aug/2020:13:12:32 -0700] “GET /test.cfm?&& HTTP/1.1” 307 -

127.0.0.1 - - [14/Aug/2020:13:12:35 -0700] “GET /test.cfm?&&&__ HTTP/1.1” 307 -

127.0.0.1 - - [14/Aug/2020:13:12:38 -0700] “GET /test.cfm?&&&& HTTP/1.1” 307 -

127.0.0.1 - - [14/Aug/2020:13:12:40 -0700] “GET /test.cfm?&&&&&__ HTTP/1.1” 307 -

127.0.0.1 - - [14/Aug/2020:13:12:43 -0700] “GET /test.cfm?&&&&&& HTTP/1.1” 307 -

127.0.0.1 - - [14/Aug/2020:13:12:45 -0700] “GET /test.cfm?&&&&&&&__ HTTP/1.1” 307 -

127.0.0.1 - - [14/Aug/2020:13:12:48 -0700] “GET /test.cfm?&&&&&&&& HTTP/1.1” 307 -

127.0.0.1 - - [14/Aug/2020:13:12:50 -0700] “GET /test.cfm?&&&&&&&&&__ HTTP/1.1” 307 -

127.0.0.1 - - [14/Aug/2020:13:12:53 -0700] “GET /test.cfm?&&&&&&&&&& HTTP/1.1” 307 -

127.0.0.1 - - [14/Aug/2020:13:12:55 -0700] “GET /test.cfm?&&&&&&&&&&&__ HTTP/1.1” 307 -

127.0.0.1 - - [14/Aug/2020:13:12:58 -0700] “GET /test.cfm?&&&&&&&&&&&& HTTP/1.1” 307 -

127.0.0.1 - - [14/Aug/2020:13:13:01 -0700] “GET /test.cfm?&&&&&&&&&&&&&__ HTTP/1.1” 307 -

127.0.0.1 - - [14/Aug/2020:13:13:03 -0700] “GET /test.cfm?&&&&&&&&&&&&&& HTTP/1.1” 307 -

127.0.0.1 - - [14/Aug/2020:13:13:06 -0700] “GET /test.cfm?&&&&&&&&&&&&&&&__ HTTP/1.1” 307 -

127.0.0.1 - - [14/Aug/2020:13:13:08 -0700] “GET /test.cfm?&&&&&&&&&&&&&&&& HTTP/1.1” 307 -

127.0.0.1 - - [14/Aug/2020:13:13:11 -0700] “GET /test.cfm?&&&&&&&&&&&&&&&&&__ HTTP/1.1” 307 -

127.0.0.1 - - [14/Aug/2020:13:13:13 -0700] “GET /test.cfm?&&&&&&&&&&&&&&&&&& HTTP/1.1” 307 -

127.0.0.1 - - [14/Aug/2020:13:13:16 -0700] “GET /test.cfm?&&&&&&&&&&&&&&&&&&&__ HTTP/1.1” 307 –

Sounds like Hebrew to me!

Any help welcome. A good drink next time you visit California!

Additional questions:

  • Have you been ever considering to use only IIS instead of this mess of Tomcat/Apache? Or maybe the simple server used by Commandbox? I believe that as you have decided to use Tomcat/Apache, a brand new standard simple Lucee configuration should work. If Tomcat does not work, please dump it!
  • Do you know if my system would be accessible from outside on the web on port 80 like it is today? Where should I put a certificate to test this (IIS? Apache? Both?)

And, by the way, hoping I am not offending you, the reason my company wants to use IIS is that we have used Apache for now 18 months with constant problems. Some of them due to the “religion” of its developers thinking that the world should be case sensitive and that a file name should not contain an underscore. I personally believe that it is not the job of an internet server to police the world. Its role is to server files when and if they are there, as provided by the file system.

All my best to you,

Paul

Hi Paul,

The problem would not be logged in the access logs, but rather the “catalina” logs. The catalina logs show how the request is passed through the various java methods. You need to see that to see what’s breaking. I’ll be more specific: The log file you’re looking for is c:/lucee/tomcat/logs/catalina.[date].log.

You cannot only use IIS in this scenario, as Lucee is a servlet. Servlets require a J2EE servlet engine of some kind. Tomcat is the most popular servlet engine, but you’re right that it’s not the only one out there. I think CommandBox uses Jetty? It’s a very similar stack though.

The problem you’re experiencing is rare, and the install you’re doing works for 99% of people who do it. In fact, simply uninstalling and re-installing may also fix your issue, for posterity-sake it would be useful to identify what exactly is causing the issue on your machine though.

Tomcat works perfectly in many high traffic, mission-critical applications. As soon as you identify the issue with your system you should be fine.

You would use IIS to do SSL termination, assuming you’re not running through a CDN or load balancer or security device of some kind.

Capitols and lower-case letters are different, so it takes more CPU cycles to identify letters if you’re trying to match case. By not matching case, your system is more efficient and can devote those CPU cycles to real work.

Let us know what you find in the logs, or how the reinstall goes.

-JM

HI JM,

I just reastarted Tomcat and Lucee.

Then I ran 127.0.0.1/test.cfm

Same error.

The log you asked me does not report anything new after the run of 127.0.0.1. Only shows the restart:

(this is the reason I had not sent it to you).

localhost_access_log.2020-08-14 continues to log the same gibberish.

This is the Catalina log, after the restart and after the url 127.0.0.1 was called 10 minutes later (no trace of it):

14-Aug-2020 16:35:13.182 INFO [Thread-2513] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler [“http-nio-8888”]

14-Aug-2020 16:35:13.212 INFO [Thread-2513] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler [“ajp-nio-127.0.0.1-8009”]

14-Aug-2020 16:35:13.226 INFO [Thread-2513] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]

14-Aug-2020 16:35:13.238 INFO [Thread-2513] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler [“http-nio-8888”]

14-Aug-2020 16:35:13.239 INFO [Thread-2513] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler [“ajp-nio-127.0.0.1-8009”]

14-Aug-2020 16:35:13.241 INFO [Thread-2513] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler [“http-nio-8888”]

14-Aug-2020 16:35:13.242 INFO [Thread-2513] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler [“ajp-nio-127.0.0.1-8009”]

14-Aug-2020 16:35:14.878 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.35

14-Aug-2020 16:35:14.881 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: May 5 2020 20:36:20 UTC

14-Aug-2020 16:35:14.881 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.35.0

14-Aug-2020 16:35:14.881 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10

14-Aug-2020 16:35:14.881 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0

14-Aug-2020 16:35:14.881 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64

14-Aug-2020 16:35:14.881 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\lucee\jre

14-Aug-2020 16:35:14.881 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 11.0.7+10

14-Aug-2020 16:35:14.881 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: AdoptOpenJDK

14-Aug-2020 16:35:14.881 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\lucee\tomcat

14-Aug-2020 16:35:14.881 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\lucee\tomcat

14-Aug-2020 16:35:14.889 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\lucee\tomcat

14-Aug-2020 16:35:14.890 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\lucee\tomcat

14-Aug-2020 16:35:14.890 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=C:\lucee\tomcat\endorsed

14-Aug-2020 16:35:14.890 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\lucee\tomcat\temp

14-Aug-2020 16:35:14.890 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

14-Aug-2020 16:35:14.890 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\lucee\tomcat\conf\logging.properties

14-Aug-2020 16:35:14.890 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED

14-Aug-2020 16:35:14.890 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED

14-Aug-2020 16:35:14.890 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED

14-Aug-2020 16:35:14.890 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: exit

14-Aug-2020 16:35:14.890 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: abort

14-Aug-2020 16:35:14.890 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms256m

14-Aug-2020 16:35:14.890 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx512m

14-Aug-2020 16:35:14.890 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.23] using APR version [1.7.0].

14-Aug-2020 16:35:14.891 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].

14-Aug-2020 16:35:14.891 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]

14-Aug-2020 16:35:14.894 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1c 28 May 2019]

14-Aug-2020 16:35:15.093 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler [“http-nio-8888”]

14-Aug-2020 16:35:15.151 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler [“ajp-nio-127.0.0.1-8009”]

14-Aug-2020 16:35:15.152 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [403] milliseconds

14-Aug-2020 16:35:15.187 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]

14-Aug-2020 16:35:15.187 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.35]

14-Aug-2020 16:35:15.196 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\lucee\tomcat\webapps\ROOT]

14-Aug-2020 16:35:15.489 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

14-Aug-2020 16:35:18.089 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\lucee\tomcat\webapps\ROOT] has finished in [2,893] ms

14-Aug-2020 16:35:18.091 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [“http-nio-8888”]

14-Aug-2020 16:35:18.097 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [“ajp-nio-127.0.0.1-8009”]

14-Aug-2020 16:35:18.099 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [2,946] milliseconds

I will do a reinstall even so I have serious doubts because in the meantime I installed Windows 10 Pro and Lucee on an old laptop I had. Clean install of both Windows and Lucee: exactly same problem.

Regarding case sensitivity, I kindly disagree with you as it is not the role of the server to check cases. It does not have to waste any time! The server passes the request as it receives it to the file system and the file system returns the file or not. If anybody wastes time because of case sensitivity It’s the file system, not the server.

Apache awfully decides to check this, and even to check what they believe is a “valid” file name which is a major problem. They do it only because of their antiquated “faith and religious beliefs” not because of standards or valid technological reasons.

I will report to you after I reinstall on the new machine (Intel latest chipset Z490, 128Gb Ram, 4TB SSD . . .).

Thanks again,

Paul

Hi JM,

I uninstalled Lucee and all components. I deleted the folder C:/Lucee

I reinstalled Lucee wit lucee-5.3.6.061-pl0-windows-installer.exe

I used all default options and included the IIS Connector.

The Lucee welcome page came ok.

Then, without doing doing anything else (no mappings, datasources or whatsoever) I typed 127.0.0.1/test.cfm

test.cfm is in C:\inetpub\wwwroot

Same problem (I was not surprised).

Works with localhost/test.cfm

Works also with http://127.0.0.1:8888/test.cfm (after copying test.cfm in C:\lucee\tomcat\webapps\ROOT)

Works with http://localhost:8888/test.cfm

As I tried this now on two very different machines (a 10 years old laptop and a brand new server) I really doubt that this is a rare problem as you tell me (unless it’s related to the air in California?)

Please try, it does not take long just to try.

The catalina.2020-08-14.log log: (AFTER the run 127.0.0.1/test.cfm)

14-Aug-2020 17:42:16.003 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name: Apache Tomcat/9.0.35

14-Aug-2020 17:42:16.005 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: May 5 2020 20:36:20 UTC

14-Aug-2020 17:42:16.005 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.35.0

14-Aug-2020 17:42:16.005 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10

14-Aug-2020 17:42:16.016 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0

14-Aug-2020 17:42:16.016 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64

14-Aug-2020 17:42:16.016 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\lucee\jre

14-Aug-2020 17:42:16.016 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 11.0.7+10

14-Aug-2020 17:42:16.017 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: AdoptOpenJDK

14-Aug-2020 17:42:16.017 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\lucee\tomcat

14-Aug-2020 17:42:16.017 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: C:\lucee\tomcat

14-Aug-2020 17:42:16.017 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\lucee\tomcat

14-Aug-2020 17:42:16.018 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\lucee\tomcat

14-Aug-2020 17:42:16.018 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=C:\lucee\tomcat\endorsed

14-Aug-2020 17:42:16.018 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\lucee\tomcat\temp

14-Aug-2020 17:42:16.018 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager

14-Aug-2020 17:42:16.018 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\lucee\tomcat\conf\logging.properties

14-Aug-2020 17:42:16.018 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED

14-Aug-2020 17:42:16.018 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED

14-Aug-2020 17:42:16.018 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED

14-Aug-2020 17:42:16.018 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: exit

14-Aug-2020 17:42:16.018 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: abort

14-Aug-2020 17:42:16.018 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xms256m

14-Aug-2020 17:42:16.018 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Xmx512m

14-Aug-2020 17:42:16.018 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.23] using APR version [1.7.0].

14-Aug-2020 17:42:16.018 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].

14-Aug-2020 17:42:16.018 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]

14-Aug-2020 17:42:16.022 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1c 28 May 2019]

14-Aug-2020 17:42:16.219 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler [“http-nio-8888”]

14-Aug-2020 17:42:16.293 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler [“ajp-nio-127.0.0.1-8009”]

14-Aug-2020 17:42:16.295 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [427] milliseconds

14-Aug-2020 17:42:16.330 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]

14-Aug-2020 17:42:16.330 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.35]

14-Aug-2020 17:42:16.340 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [C:\lucee\tomcat\webapps\ROOT]

14-Aug-2020 17:42:16.575 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

14-Aug-2020 17:42:28.489 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [C:\lucee\tomcat\webapps\ROOT] has finished in [12,148] ms

14-Aug-2020 17:42:28.490 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [“http-nio-8888”]

14-Aug-2020 17:42:28.497 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [“ajp-nio-127.0.0.1-8009”]

14-Aug-2020 17:42:28.499 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [12,204] milliseconds

Hi Paul, really sorry you hit that issue that took a lot of time. I totally can understand what you’ve went through.

Unfortunatly you can’t get rid of Tomcat, because Tomcat runs all your CFML. There are other such servers that runs java servlet containers that would do also that job, but to run CFML (no matter if Adobe or Lucee) you’ll need one of that. Just like some Node JavaScript Pages wouldn’t work with IIS alone, it would need Nodejs running to serve dynamic content.

For the problem you’ve faced, I’m sure we from the community or one of the devs team will come with a solution, at least posting some instructions. I’,d like to do this, but I’m short of time at the moment.

Just to remind, there is very much, really a lot of wizard magic being done by the installer/boncode/mod_cfml in the background and sometimes that simply happens because the magic always depends very much on how the OS and IIS is running and the security context it is running with (file permissions erc). I think the cause of the problem might also be, because tomcat runs for the sake of security in a very low privileged manner and at some point that may clash with one or the other server setup.

As a long time community member here I can tell that every time I use the installer, I fell so glad about Jordans Magic Installer helping to do all the stuff I had to do manually back in the past. Like some other issues the installer already faced before, I’m pretty sure this one will be also addressed and resolved as soon as they people have the time to do so.

But… Whenever you face some issue, please post it here! We from the community or one of the Lucee Team will be glad to help you with it.

Thank you andreas
I certainly appreciate the fantastic work the Lucee team is doing.
Having written multiple compilers and interpreters myself, I know what it is!
The major problem I have with 127.0.0.1 not being recognized is that I cannot use the debug feature as if I add a template restricting to 127.0.0.1 the debug is not activated.
I also tried to add “localhost” and the local network address (192.168…) to the list of accepted IP range to no avail. I can only activate the debug if I add all IP’s (“*”) in the list which, of course, is not acceptable as everybody using my web site would see the debug info.
I would greatly appreciate if anybody had a solution.

Ok Paul, I totally understand. One solution would be to deactivate mod_cfml and add the context manually. However, that would stop the automatization of contextes being created automatically by simply adding them to IIS only. That means that every time you add a new site to IIS, you’ll have to add it also manually to your Lucee configuration. Also contexts already added by mod_cfml will possible break, having to be added manually to Tomcats configuration. So let’s go:

I’m supposing you have a default Lucee Installer installation on Windows Server 2019.

  1. First deactivate mod_cfml by editing your server.xml file at path-to-your-lucee-installation\tomcat\conf\server.xml. Search for the string mod_cfml and you should find the comment of the mod_cfml valve and the valve tag below ( the valve is in the body of <host name="127.0.0.1" ...> ), like so:
<host name="127.0.0.1" ...>
...
<Valve className="mod_cfml.core"
		loggingEnabled="false"
		maxContexts="200"
		timeBetweenContexts="2000"
		scanClassPaths="false"
                responseCode="307"
		sharedKey="somekey"
		/>
...
</host>

and set it to comment like so:

<Host name="127.0.0.1" ...>
...
<!--Valve className="mod_cfml.core"
		loggingEnabled="false"
		maxContexts="200"
		timeBetweenContexts="2000"
		scanClassPaths="false"
                responseCode="307"
		sharedKey="somekey"
		/ --> 
...
</host>
  1. Add a configuration file ROOT.xml to path-to-your-lucee-installation\tomcat\conf\catalina\127.0.0.1\ROOT.xml. Very probably the folder 127.0.0.1 will already exist, but there is no ROOT.xml inside. Create that file with following content ( in this example I suppose you want to add the IIS wwwroot C:\inetpub\wwwroot\ to tomcat ) .
<?xml version='1.0' encoding='utf-8'?>
<Context docBase="C:\inetpub\wwwroot\">
</Context>
  1. In your IIS Manager make sure your default website basic setting is set to the same path to the docBase attribute you have just added ( in this example it is "C:\inetpub\wwwroot" )

  2. Restart IIS and Tomcat (wait for Tomcat to create all contextes) and open http://127.0.0.1:8888 first to check if Tomcat is running correctly, then try accessing it through IIS to check if everything is working http://127.0.0.1

Wish you the best luck.

Odd that ‘localhost’ would resolve to a public IP instead of 127.0.0.1. Did you customize your hosts file?

The reason this is an issue with 127.0.0.1 alone is because 127.0.0.1 is the context (domain name) that mod_cfml is set to listen to in Tomcat. If you changed the default Tomcat host to ‘localhost’ and your context config to use the ‘localhost’ name instead of 127.0.0.1, things would function normally for you.

You do not need to remove mod_cfml, just change the default context associated with it.

example server.xml config:

<Engine name="Catalina" defaultHost="localhost">

 <Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true">

127.0.0.1 was replaced with ‘localhost’ in the above config.

Or, yeah, you could remove mod_cfml altogether and just do things manually.

-JM

2 Likes

Thanks so much JM
That works perfectly!!!
You are the best