It's not possible to update the server.xml via the...
# lucee
m
It's not possible to update the server.xml via the administrator. But tomcat can be configured to check for changes to the server.xml and will restart itself when the fileis modified. So, if you do some coding to modify the the server.xml via a script, this should be possible. Basically mod_cfml is doing exactly this in the background
👏 1
c
Thanks Mike. Its a shame we can't add host entries in the Administrator, like we can add Schedule Tasks. It seems a bit crazy to have to restart the application server, just for a host entry. I have 24 websites on my VPS. Every time, I restart the application server, the websites have to load up again, from scratch, which causes a delay for the first unfortunate user that visits a particular website, after a restart. â˜šī¸
a
Why does the application server need to know about the host names for the websites the application server is backing?
or is the one app server handling multiple applications (ie: completely different codebase dirs)?
m
Exactly. Tomcat and Lucee do not interact in this point. Same for Apache/nginx and Tomcat.
What you may need is a setup with the new Lucee6 feature single admin and docker containers. Spin up a new container which doesn't interact with the rest
c
@Adam Cameron What I mean, is that
server.xml
is inside:
Copy code
C:\lucee\tomcat\conf
Which is inside the Lucee folder, so I am using application server, as a very loose term. But, as you say, it is inside the Tomcat folder, so I guess the Lucee Administrator has no jurisdiction over this file. Can you tell me if the Apache Tomcat 9.0 Lucee Control Panel [please see screenshot], restarts Lucee or Tomcat or both? Maybe, there a way to just restart Tomcat?
m
This one is restarting Tomcat and everything running within Tomcat (means also Lucee).
👍 1
a
Tomcat is the app. Lucee is just some jar files.
👍 1
👏 1
👍đŸŧ 1
c
Thanks for the clarification 🙂
a
Yes, I know which file you meant. What I was asking is what the need for additional
<host/>
entries in there, from a Lucee perspective?
I'm not suggesting you don't need to (maybe). I just wanna understand what yer doing.
c
@Adam Cameron All, I am trying to do, is set changes in:
Copy code
C:\lucee\tomcat\conf\server.xml
Without restarting Tomcat. Because that has unwanted side effects.
I was just hoping there was a way I could do this in the Lucee Administrator [which you have now told me that I can't 👍] or maybe there is some executable that sets the newly added host entry, without restarting the entire Tomcat application?
I live in hope 🤞
a
Its a shame we can't add host entries in the Administrator, like we can add Schedule Tasks.
c
And I am also having a look at `Tomcat Host Manager`: https://tomcat.apache.org/tomcat-8.5-doc/host-manager-howto.html
And I think the Tomcat
mod_cfml
valve allows this to happen. According, to the docs, it takes 200ms to update Tomcat, when a new alias is added. In Windows speak, this would be the equivalent of adding a new binding in IIS. At this point, a signal is sent, via the
mod_cfml
valve, to Tomcat to update the host file. Unfortunately, I have my `mod_cfm`l valve, commented out, currently. https://viviotech.github.io/mod_cfml/
If anyone else is interested in knowing how to add an alias to an existing host entry, without restarting Lucee Apache Tomcat, and without using mod_cfml, on:
Copy code
Windows Server 2012R2
IIS 8.5 
Lucee 5.3.6.61 with Apache Tomcat
Please look at: https://dev.lucee.org/t/access-to-host-manager-in-lucee-5/1877/6?u=charlesr