404 for /lucee/res IIS BonCode

Hi, please help me)
When I try to display debug info on page http://example.com?sd=1
I receive many 404 errors from links like: http://example.com/lucee/res/js/util.min.js.cfm

What I’m doing wrong?

WEB CONTEXT
URL:http://example.com:80/lucee/admin/web.cfm
Webroot:E:\example\
Configuration File: E:\example\WEB-INF\lucee\lucee-web.xml.cfm

URL: http://127.0.0.1:8889/lucee/admin/web.cfm
Webroot: C:\lucee\tomcat\webapps\ROOT
Configuration File: C:\lucee\tomcat\webapps\ROOT\WEB-INF\lucee\lucee-web.xml.cfm

OS: Windows Server 2012 R2 (6.3) 64bit
Java Version: 1.8.0_144 (Oracle Corporation) 64bit
Tomcat Version: 8.5.33
Lucee Version: 5.3.4.80

Hi Vintic,

this is really difficult to diagnose, because 404 page can have many reasons. The files you are trying to retrieve are from the lucee context, and for security reasons they probably won’t be loaded. They will be blocked and only shown when you access through port 8888 (bypassing IIS).

WIth the assumption that the paths are configured correctly:

It would be helpful to understand whether the error is thrown by IIS or by Tomcat.
You can turn off HTTP header codes forwarding on BonCode <EnableHTTPStatusCodes>false</EnableHTTPStatusCodes> .
If you see Tomcat error then it is Tomcat complaining, you need to fix it there. If you continue seing IIS errors, you have IIS permissions issues. Fix it in IIS.

Thank you,
IIS errors is steel present after I set <EnableHTTPStatusCodes>false</EnableHTTPStatusCodes>. What permission should I set?

HTTP Error 404.0 - Not Found

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

Detailed Error Information:

Module IIS Web Core
Notification MapRequestHandler
Handler BonCode-Tomcat-CFM-Handler
Error Code 0x80070002
Requested URL https://example.com:443/lucee/res/js/util.min.js.cfm
Physical Path E:\example\lucee\res\js\util.min.js.cfm
Logon Method Anonymous
Logon User Anonymous

Most likely you have a file/directory requirement. IIS will check whether file or directory exsits before forwarding the request to Tomcat.

Since anything under path lucee is virtual and controlled by lucee such directories and files are not present for IIS to find, thus it will throw 404.

You have a few options:
a) Create empty files and directories mimimicing files that you need to see in debug. IIS will believe these files exist, and forward your request to Tomcat and Tomcat will promptly ignore them and use its mapped files.

b) You can add a wildcard handler for path /lucee and disable request restrictions:
https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh831697(v=ws.11)#request-restrictions-dialog-box

I tried first option,
Now, return from this xxx.css.cfc and js files is empty. Tomcat doesn’t ignore created files.

Second option fixed the problem, but at first empty files that was created should be removed.
Thank you Bilal.

Glad to hear it worked.