Adding sites to Lucee on IIS / Win 2019

Hi all,
I’m trying to get a few sites running on Windows Server 2019. I’ve followed the install guide and Lucee works with IIS for the default site.

I’m looking for best practices when it comes to running and configuring additional sites, all of which should run under Lucee.

My qeustion: Should I add additional sites in IIS as normal, then re-run C:\lucee\AJP13\Connector_Setup.exe again to make those sites ‘speak’ CFML or is that not necessary? I’m currently having problems accessing a second site on that server, the connection times out and I am unsure how to troubleshoot.

Accessing the server by its IP address works fine and loads the test page that I deployed under the default site (IIS root).
The other site has been configured by host name and that host name’s DNS uses the same IP that works for the default site. In other words a very simple setup.

UPDATE I checked the handler mappings for both sites and they are identical, all listing *.cfc, *.cfm and *.jsp so it does not appear that re-running the connector is necessary.

Many thanks,

Stefan

If you have the handler mappings set up at the top server level in IIS, it shouldn’t be necessary to run-install anything. You may need to restart Tomcat to refresh mod CFML’s cache of context ID to site mappings.

Thank you, I’ve restarted Tomcat and the WWW Service but the newly created site is not responding.

What could I try next to debug this? Should I remove the CFM handlers and see if IIS will serve up an HTML index file? I guess my question is, how do I determine if I have a problem with Lucee or elsewhere? Or can I hit Tomcat directly remotely to serve up a CFM file to confirm that that part is working?

I’ve done site setups like this hundreds of times with CF and IIS and I am a bit stumped with this issue.

If you say you have other IIS sites working with Boncode and hitting Tomcat on the AJP port and running CF code, then I’m not sure why another site wouldn’t work unless you had a BIN folder in that web root with different boncode settings. I would say start enabling logs

  • IIIS access logs and detailed errors
  • Boncode logs
  • Tomcat access logs
    And see just how far the requests are making it. The question is where is it timing out at. When you do a global Boncode installation, the boncode settings file is in the windows folder and SHOULD contain the host and AJP port used for all sites. Double check that against your AJP listener in your Tomcat server.xml and just start tracing all the settings through.

Which install guide did you follow? If you’ve setup the installation following in the Quick Video Installing Guide on a Clean Windows 2019 Datacenter (including step 4), all you would need to do is add the site to IIS and give Tomcats user write access to those IIS webroots. The installed mod_cfml should take care of identifying those new IIS webroots and configure Tomcat for you.

Hi Andreas, yes I followed the video guide. Right now it seems that I’m having trouble accessing any site by host name, only the default site works via IP.
I’ve followed all the steps in regards to IIS permissions, write access etc. I’m pretty confident that’s all fine but I will double check.

If you followed that video guide, you’ve boncode and mod_cfml installed. You won’t need to reinstall it All you need to do to install a site is:

  1. Add the site to IIS and specify a specific webroot
  2. Give the user running Lucee the file permissions for that new added webroot directory (like shown in the step 4 of the video guide)
  3. Open the site in your browser through port 80. That will fire mod_cfml in the background and configure tomcat for you*
  • What I mean with "configure Tomcat for you is: You won’t need to do any changes to your server.xml, because mod_cfml will populate all that settings for you into Tomcats memory and create all context settings and populate the directory in /path-to-lucee-installation/tomcat/conf/catalina/ with context comfiguration files

If you want to recreate/reset these settings, do the following steps:

  1. Stop Tomcat and IIS service
  2. Delete all folders and files in /path-to-lucee-installation/tomcat/conf/catalina/
  3. Restart Tomcat and IIS (give the enginse some time to load/run)
  4. Open the sites in your Browser though IIS port 80 and you can watch mod_cfml recreating the configs files in the catalina directory.

If that don’t work and you still can only access the site by IP, make sure your DNS resolution is providing the correct IPs of the site host names.

If you still need help, let us know.

Thanks, that’s really helpful.
I’ve done some more testing and managed to get another site with test domain up and running. Maybe something is borked with the DNS for the specific domain I am trying to set up. The IP resolves correctly.

I’ll keep digging, will report back.

I’ve found when lucee doesn’t work:

  1. Download a FRESH copy of lucee and check CRC
  2. Remove all instances of Lucee (or just create new windows instance fro m FRESH IMAGE if this happens more than once)
  3. Reboot
  4. Reinstall Lucee

it should just work, if not something’s wrong with install (which seems to be happening less and less these days on win server 2019), works fine also on server core once main iis components are installed also… (use choco)

Thanks all. Luckily I kept an EC2 machine image from when I installed things afresh. I went back to that (fresh Lucee install) and retraced my steps.
There’s something weird going on with one specific subdomain, I will debug this later as I do not think it has anything to do with the Lucee setup but other subdomains work for me now, I can add new sites and access them via IIS/Tomcat/Lucee.

I’m in the process of setting up AWS Codedeploy so I can push to release, it’s working now but my word that was a mission to get configured properly…

I’ll report back if I manage to work out what the matter i with this one specific subdomain (my staging domain).

Cheers

Stefan

1 Like