404 error on all .cfm pages

I managed to get my first install of Lucee 5.1.3.18 up and running on a Windows 2016 server using the Windows installer and I’m able to access and configure the Lucee Admin. However, I’ve run into a problem where all .cfm pages are throwing 404 errors. I’ve verified the location of my test .cfm files in the proper virtual directories, but they throw 404 errors. I’ve dug through both the IIS and Lucee logs and have come up empty. Here is the Lucee error I’m seeing:

"Severity","ThreadID","Date","Time","Application","Message"
"ERROR","ajp-nio-8009-exec-3","04/18/2017","18:05:18","",";Page /index.cfm [C:\inetpub\wwwroot\index.cfm] not found;lucee.runtime.exp.MissingIncludeException: Page /index.cfm [C:\inetpub\wwwroot\index.cfm] not found
	at lucee.runtime.PageSourceImpl.loadPage(PageSourceImpl.java:908)
	at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:885)
	at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:838)
	at lucee.runtime.listener.ClassicAppListener._onRequest(ClassicAppListener.java:63)
	at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:44)
	at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2394)
	at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2385)
	at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2353)
	at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:917)
	at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:102)
	at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:62)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
	at org.apache.coyote.ajp.AjpProcessor.service(AjpProcessor.java:478)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:798)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1434)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)

Does that file exist and is that your expected web root?

Yes, the file exists and that’s the expected web root. I’ve tried accessing it through the IP address with /index.cfm at the end and I’ve also tried http://localhost/index.cfm on the server to no avail.

Do you get the same error if you hit Lucee/Tomcat’s HTTP port directly and bypass IIS? Also, how are you connecting IIS to Lucee? BonCode? Reverse proxy?

How would I go about hitting the port directly? I’m connecting IIS to Lucee through the connector that came with the install package for v5. I believe that is BonCode.

Check the Tomcat server.xml file and see if the HTTP listener is uncommented. The port will be set there. If not, you can uncomment it and restart.

<Connector port="8080" redirectPort="8443" maxThreads="500" connectionTimeout="20000" protocol="HTTP/1.1"/>

It’s just nice to rule out the IIS part of the puzzle to start with. To test, you’ll need to make sure you’re using localhost which is the default host configured and set the docBase to your web root.

<Context path="" docBase="C:\inetpub\wwwroot\" />

1 Like

What happens if you put a file with HTM extension?

I was having a similar issue where I was getting a 404 error on all the scripts. For me, the fix was to update the IIS default website’s physical path to the root folder under lucee (C:\lucee\tomcat\webapps\ROOT). It was previously set to %SystemDrive%\inetpub\wwwroot. Once I made this change and granted read access to everyone to the root folder, my issue was resolved.