Multi mode context settings not working in Lucee 6 on Windows 11 IIS

OS: Windows 11 Pro
Java Version: 21.0.6 (Eclipse Adoptium) 64bit
Tomcat Version: Apache Tomcat/10.1.36
Lucee Version: 6.2.0.321
Web Server: IIS

Last year, I posted about an issue I was having with Multi Mode when upgrading from 5.4 to 6 ( Attempting to Update Lucee from 5.4.3.2 or 5.4.5.23 to 6.0.1.83 results in error - support - Lucee Dev ). With the impending end to LTS for 5.4 at the end of the year, I had to tackle this again, and, again, I am facing the same problem I was at the end of that post: context settings not getting saved. In order to troubleshoot this, I did a fresh install of Windows 11 and a fresh install of IIS & Lucee 6 (no 5.4 involved). The problem remains. Here are the steps I took:

  1. Installed Windows
  2. Installed IIS
  3. Installed Lucee 6.2.0.321
  4. Visited http://127.0.0.1:8888/index.cfm (welcome page worked fine)
  5. Visited IIS default local site (The Lucee welcome page initially errored out, but replacing it with basic cfoutput of Now() proved Lucee was connected.)
  6. Opened Lucee admin
  7. Switched to Multi Mode
  8. Added “C:\inetpub\wwwroot” individual context for IIS default local site
  9. Made changes
  10. Saved changes
  11. Reopened individual context settings: No changes saved
  12. Restarted Lucee
  13. Visited IIS default local site to trigger Lucee admin to recognize the context

Result: Configured context no longer listed under “specific web contexts”, but had returned to “create new web context” drop down.

It appears as though, even on a fresh install, Lucee isn’t saving individual context settings. Other oddities I’ve noted:

All changes are saved to “C:\lucee\tomcat\lucee-server\context.CFConfig.json”, but the admin doesn’t display or enforce them.

The default Lucee welcome page did eventually load via IIS, but gave this message: “Warning, if you can see this message, your webserver webroot is not mapped to [C:\inetpub\wwwroot]. This means Lucee is only configured to handle .cfm and .cfc and other files like css, js and images won’t load properly.” This happened regardless of whether or not I had defined that context, but I think that’s more about assets not being copied alongside the index.cfm than a context configuration issue.

If I change the General context settings, those settings will be applied to any new specific context that I create. Security settings made this way will be enforced in the specific context, even if the General context setting is changed, but they cannot be modified. Restarting Lucee resets enforcement to whatever the General context is set to. So, it appears to acknowledge the context, without allowing further modifications, but only until a service restart.

If I switch the General context to “Local” and add an external folder, it will also automatically add C:\Lucee\tomcat\Lucee-server\context\temp.

Is no one else running into this?

I can’t dig into all your questions, but:

Not loading static files through a fronted web server is well know and default behavior, what has nothing to do with web contexts, its simply that only .cfc/.cfm files are redirected to Tomcat and static files not. You need to add the web app root that is served by Tomcat to be served also by IIS as well, otherwise IIS won’t know from where to get those static files. It will look for those in the iIS webroot, where they are not placed.

Makes sense. Having originally come from the world of ACF where the IIS connector makes all those virtual directories for the user, I wasn’t sure if this was an error in the Lucee IIS connector, or just an assumption that the user would be the one to take care of that.

This doesn’t seem to be getting much traction. Is everyone else able to use context settings in Lucee 6 without any issues? What do I need to do to get this looked at? Should I report a bug?

ok, let’s figure this out. Been over a decade since I’ve played with IIS, let’s see how we go.

  1. You used the windows installer?
  2. Are you using boncode / mod_cfml?
  3. Do you see WEB-INF/lucee directories being created under each webroot?
  4. Are you seeing host specific folders with a Root.xml under c:\lucee\tomcat\conf\Catalina\ ?

Thank you! I really appreciate the help. Since the majority of the issues I’m seeing are occurring in the admin via the 8888 port, which I understand to be a direct call to Tomcat, my suspicion is that IIS isn’t at the root of this issue. But, I fully admit to limited knowledge on the matter. To answer your questions:

  1. Yes
  2. Yes. I believe I selected all the default settings during install. Definitely mod_cfml.
  3. Yes. There’s currently only one IIS webroot on the fresh install–the default C:\inetpub\wwwroot\
  4. I see a “localhost” folder without a ROOT.xml and a “w3svc1” folder with a ROOT.xml

You’re accessing the Lucee web admin from each individual host?

Okay, looking back on what I’ve written, I think I may have been misleading. Sorry about that. I’m specifically working with the security contexts inside the server admin (Security > Access). I hadn’t gotten past that to see if the settings in each site’s web admin are having issues. Briefly testing those, they appear to work as expected.

If it matters, I’ve been accessing the server admin via 127.0.0.1:8888/lucee/admin/server.cfm. I haven’t really been accessing the web admin since I’m so focused on the security contexts, at this point, but I usually access that via [domainname]:8888/lucee/admin/web.cfm. FWIW, when I access that, initially, it reports the following:

Configuration File C:\lucee\tomcat\webapps\ROOT\WEB-INF\lucee.CFConfig.json
Webroot C:\lucee\tomcat\webapps\ROOT

After accessing the a page on the site via IIS and triggering mod_cfml, it reports this:

Configuration File C:\inetpub\wwwroot\WEB-INF\lucee.CFConfig.json
Webroot C:\inetpub\wwwroot

So, in general, it seems that context are working. It’s just the security settings that aren’t being retained.