Hi Guys I was looking through my `lucee-stderr.20...
# lucee
c
Hi Guys I was looking through my
lucee-stderr.2024-02-27.log
, this morning, because I am trying to remove a few bugs, from my Lucee set-up, and I noticed this:
Copy code
lucee.runtime.exp.MissingIncludeException: Page /index.cfm [C:\domains\circlemaker.establishmindfulness.com\wwwroot\index.cfm] not found
Now, this is correct because there is no index.cfm, in this directory. It actually points to an Angular website, that only has an index.html. I may want to add some CFML functionality to this website, later on, which is why I have added a host entry in server.xml, like:
Copy code
<Host name="circlemaker.establishmindfulness.com" appBase="webapps">
	<Context path="" docBase="C:\domains\circlemaker.establishmindfulness.com\wwwroot\" />
	<Alias>circlemaker.establishmindfulness.com</Alias>
</Host>
In my web.xml, I have the following:
Copy code
<welcome-file-list>
	<welcome-file>index.cfm</welcome-file>
	<welcome-file>index.html</welcome-file>
	<welcome-file>index.htm</welcome-file>
</welcome-file-list>
Which I thought might prevent the error above? But, clearly this is not the purpose of the
<welcome-file-list>
By the way, if I try and add an empty index.cfm file, in the directory, my website just displays a blank page, because it seems like index.cfm takes precedence over index.html. If I change the order of the
<welcome-file-list>
, I am worried that all my other websites, which are CFML based, will start throwing exceptions that there is a missing index.html file? But I am not even sure whether the
<welcome-file-list>
has anything to do with this issue, anyway? Or maybe I should just remove the host entry in server.xml, and just rely on IIS to serve this website? Does anyone know how I can prevent this Exception, from being thrown, in future? Environment:
Copy code
Windows 2019
IIS10
Lucee 5.3.9.166
b
I don't understand what you're trying to fix
Someone hit a file that does exist.
Lucee logged a message to say such
That's it
If someone hit
/foobar.cfm
you'd see a similar message
Just because someone hit a file that wasn't there doesn't mean anything is wrong or anything needs changed.
If you want to change the error that happens in the event of a missing file, then setup a on missing template handler to handle that error.
The welcome files control what file in a folder will be searched for and in what order when a browser requests a folder name without a file. The web server (or servlet this case) searches through the list until it finds one of the welcome files on disk, then defaults to showing that file
If there is no index.cfm on disk in that folder, then I assume someone simply typed it in from the browser URL or followed a link from somewhere that included it, or you have some rewrite rule that added it.
c
But that’s the thing, the only person who knows this website exists is me and, if that wasn’t the case, no one would have put index.cfm, on the end of the URL? I also don’t have any schedule tasks hitting this website. It is an Angular website, anyway.
b
Ok, but it is what it is. If you want to know where that request came form, set up server logs and track the IP and user agent. But again, it doesn't represent a configuration issue necessary just that it got hit in general
👍 1
c
OK. Thanks 😊