Mappings not working with IIS and Boncode

@Zackster Lucee is working after installing but integration with IIS via AJP Boncode Connector does not work well :frowning:
image

Any idea? CFM and CFC handlers are present at my site.

Does the IIS webroot point to “C:\lucee\tomcat\webapps\ROOT” ?

No, C:\inetpub\wwwroot (default)

What I saw that “secret” is required in server.xml, but not defined in BonCodeAJP13.settings

I mean this:

One detail: I didn’t use mod cfml

you only mapped a handler for cfc and cfm, so IIS is trying to serve the css, js and images files from C:\inetpub\wwwroot, lucee is only serving cfc and cfm files

Which configuration file are you looking at? c:\windows\BonCodeAJP13.settings or where the boncode installation files get extracted before being installed?

Everything is correctly connected in your setup. To understand what is going on, you need to understand the following thing:

  1. Your IIS is serving the webroot from C:\inetpub\wwwroot (default)
  2. Your Tomcat/Lucee is serving the webroot from “C:\lucee\tomcat\webapps\ROOT”

That means: if you open the localhost directly through tomcats port 8888, tomcat will serve everything from “C:\lucee\tomcat\webapps\ROOT”. All cfm, cfc and static files will come from that webroot alltogether.

BUT: if you retrieve localhost through IIS (port 80) the connector will direct the requests for cfm/cfc files to Tomcat, while the static files will be served directly from C:\inetpub\wwwroot (default)“. IIS won’t be able to find the static files there (the css, images or javascript will retrieve 404 http error codes then). The cause: These are all placed in the other webroot at “C:\lucee\tomcat\webapps\ROOT” and not in “C:\inetpub\wwwroot (default)””.

So you just need to adapt your Tomcat and/or IIS to point to only one single webroot (e.g. C:\lucee\tomcat\webapps\ROOT). As soon as IIS and Tomcat are configured with the same physical address, you’ll see that everything will work.

1 Like

C:\Windows\BonCodeAJP13.settings
I was looking in wrong directory

I managed to get it work, thank you for help @andreas and @Zackster .
I added Context path to server.xml:
image

and because of a Ip4-Ip6 delay issue also this:
image

In older version Lucee 5.2.9.31 that comes with Tomcat 8.5 I never needed to manually configure directories or anything. IIS + Boncode + Lucee combination worked out of the box without modifications.

Maybe that has changed in Tomcat 9?

This is done by mod_cfml and as far as I undestand and know, this didn’t change. mod_cfml detects added sites in IIS and configures Tomcat for you, so you usually don’t need to manually configure Tomcat. Do you have mod_cfml installed? This usually is asked during the installation process.

I also think that this doesn’t apply for localhost, because localhost is already preconfigured in Tomcat as default, thus it won’t need to be added by mod_cfml. But as soon as you add another site in IIS (e.g. my-domainname.com) it will be added by mod_cfml in Tomcat/Lucee.

@Zackster Wouldn’t it make sense to load these few static files of the “Lucee Welcome Application” with the help of a cfm loader file, simliary as it’s done with the help of graph.cfm with temp images? Doing this we could avoid these 404 errors at least for the default welcome.

Are these in the Lucees github repository? Can’t find them right now :confused:

UPDATE: Found it in the installer files :smiley:

No, no, no

Webroot is the webroot and shouldn’t work if its not configured properly.

The admin is a different kettle of fish and needs to always work

If we route welcome page resources thru a handler, we are then just simply hiding a config problem, which is even more confusing.

The only change i’d consider making for the welcome homepage is a warning message hidden by the welcome page CSS file, explaining why exactly this problem is happening.

These are good 404 errors, IMHO :wink:

2 Likes
2 Likes

This is AWESOME!