BUG? - Lucee treats the root of a deleted websites as existing websites

I have a development box Win 10, with some websites all supported by IIS.

I installed Lucee, and it made connections to all the sites successfully (including the creation of subfolders WEB-INF in the root directory of each site).

After that and through IIS I deleted one of the websites. Obviously after this deletion the website does not exist as website any more, is not in IIS websites list, and it is just a folder on disc (e.g. C:\projects\site1\wwwroot).

After the deletion I noticed that Lucee didn’t delete the subfolder WEB-INF of the root, as it should in the context of an automatic disconnection. I thought WEB-INF is just trashes left behind of the disconnection. Anyway having to do with just a simple folder anymore, I deleted it manually.

Then I was surprised to see that Lucee re-created subfolder WEB-INF !!!, as if C:\projects\site1\wwwroot was the root of an active IIS website!!!

I deleted again the folder WEB-INF, and Lucee again re-created and again and again. Lucee was looking like had no idea that the website does not exist anymore.

I restarted IIS service in case there is still something in IIS that Lucee still “see”, but nothing changed. Lucee was re-creating the WEB-INF folder every time I was deleting it.

I restarted Lucee service and after that Lucee stopped creating the WEB-INF folder.

CONCLUSION

Lucee “sees” website setup in the web server level, and successfully creates connection to them,

BUT does not “see” a website deletion, and so it keeps on treating the ex-website root folder as an active website root, although it’s just a simple disc folder anymore.

It’s not just a matter of leaving trashes behind for manual deletion. The fact that after manual deletion of WEB-INF, Lucee recreates this folder proves that Lucce still think there is a website there and try to repair damage!!! Isn’t it?

Obviously the Lucee system checks every few seconds the list of the websites to see if there is any new one to connect, but it does not check if previously existing website does not exist anymore, in order to stop treating it as website.

All Lucee knows about a webserver is what headers are passed along with each request which gets passed thru to tomcat and then Lucee. There’s no way to know if one disappears just coz you deleted it in IIS

are you using mod_cfml? it auto creates hosts via files under C:\tomcat\conf\Catalina which also need to be manually deleted if you remove a IIS website

1 Like

Thank you Zac for your reply. In my post “Lucee” I mean all the packet being installed during Lucee installation including mod_cfml. Obviously as far as mod_cfml is the tool “watching” the web server activities on setting up new sites and making the needed connections, I guess the same tool should know the site deletion and stop treating it as existing one. Anyway I did some tests and yes you are right. mod_cfml stops creating WEB-INF folder when the C:\Lucee\tomcat\conf\Catalina\w3svcN folder (including root.xml) is deleted manually. (N = Web server site ID). Something interesting I noticed is that after creating a new site in web server the mod_cfml does not creates WEB-INF folder automatically indeed. It creates it only when a cfm page runs for very first time in this new site.

if you bump up the logging for mod_cfml (mod_cfml - Documentation - mod_cfml.so) you can see it passes all the headers thru to tomcat and the tomcat valve plugin dynamically creates any missing web contexts.

I also would highly recommend moving the WEB-INF directories out of the web roots

1 Like