I’m just starting with Lucee.
I’ve a problem with WEB-INF creation. When I create a new site, a WEB-INF folder is created in the root of the site. (Which I expect!)
If I browse to a subfolder of that site it copies a new WEB-INF folder and all its content too. Whilst it copies WEB-INF, the page is either slow to load or fails to load. I have only one Application.cfc per site and this is at the root of the site.
Is there any action I can take to stop this, so it uses one WEB-INF per site?
OS: Windows 10
Java Version: 8.0.261
Tomcat Version: 9.0.35
Lucee Version: Lucee 188.8.131.52
can you describe your webserver config? are you using mod_cfml?
Very probably you’ve setup in tomcats server.xml and context configuration your appBase identical to your docBase. That will cause this type of deployment. Can you check that?
appBase must not be equal docBase.
what shows up at the bottom of http://127.0.0.1:8888/lucee/admin/server.cfm ?
a WEB-INF is created for each webroot lucee encounters
BTW, I’d highly recommend moving WEB-INF outside your webroot(s)
I have 23 WEB-INFs off my web ROOT.
/lucee/admin/server.cfm shows three web contexts:
URL: EMPTY STRING (displays blank)
Mod_cfml – I didn’t think so. I’ve just made the basic install. There is mod_cfml/mod_cfml-valve_v1.1.11.jar in my lucee home folder and in server.xml is:
<Valve className="mod_cfml.core" loggingEnabled="false" maxContexts="200" timeBetweenContexts="2000" scanClassPaths="false" responseCode="307" sharedKey="07b...deleted for brevity" />
In my server.xml I have kept the local host and these two additional hosts:
<Host name="myhtml.local" appBase="webapps"
<Context path="" docBase="C:\lucee\tomcat\webapps\ROOT\myhtml\src\" />
<Host name="scratch.local" appBase="webapps"
<Context path="" docBase="C:\lucee\tomcat\webapps\ROOT\scratch\" />
(I’m really sorry for not replying sooner. I’ve had a day that’s kept me away from my laptop. Thank you for your help and support.)
yeah, don’t nest your sites under the same webroot,
the behaviour you’re seeing is expected
set up mod_cfml, put each site under it’s own webroot
configure a webserver to server each site
Thanks. I’m not at all familiar with mod_cfml or what it does. Is it a requirement for Lucee?
Is there a template server.xml for multiple sites that I can base my config around and so I don’t repeat my mistakes?
Basically mod_cfml automates the creation of sites based on your webserver config, you never need to touch server.xml to setup a site once it’s setup.