How exactly are new host entries automatically added to the server.xml
file upon adding a new website?
They aren’t. Mod_cfml does NOT (currently) alter Tomcat’s server.xml file.
When tomcat starts up, it reads the server.xml file and updates its in-memory, running config according to the configs laid out in the server.xml file. What mod_cfml does is dynamically add new hosts to that in-memory, running config. Any time you stop and start Tomcat, any host that is not configured in the server.xml file will be dynamically added to the running config as mod_cfml creates them.
The idea for mod_cfml was adapted from Tomcat’s own “Host Manager” project, which does the same thing manually via a web interface. However, paired with a web server module to pull the information that’s needed to create a new host, we’ve adapted the classes the Host Manager app uses to function automatically.
The project is fairly well documented here:
http://www.modcfml.org/index.cfm/install/introduction/
If, after reading that, you still have questions, please don’t hesitate to ask.–
Kind regards,
Jordan Michaels
Vivio Technologies
----- Original Message -----
From: “Josh Beach” <@Josh_Beach>
To: “Lucee” lucee@googlegroups.com
Sent: Tuesday, May 17, 2016 10:40:07 AM
Subject: [Lucee] Confusion regarding mod_cfml automatically adding new hosts to server.xml
After reading this article from
Gavin: http://www.gpickin.com/index.cfm/blog/pros-and-cons-of-modcfml-with-tomcat-for-lucee
I have a question…
How exactly are new host entries automatically added to the server.xml file
upon adding a new website?
I see the following code in our server.xml file:
<!--
EXAMPLE HOST ENTRY:
<Host name="lucee.org" appBase="webapps">
<Context path="" docBase="/var/sites/lucee.org" />
<Alias>www.lucee.org</Alias>
<Alias>my.lucee.org</Alias>
</Host>
HOST ENTRY TEMPLATE:
<Host name="[ENTER DOMAIN NAME]" appBase="webapps">
<Context path="" docBase="[ENTER SYSTEM PATH]" />
<Alias>[ENTER DOMAIN ALIAS]</Alias>
</Host>
-->
<!-- ADD NEW HOSTS HERE -->
Is below where the new host entries are
automatically created? Or is this section only for manually adding them?
–
Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html
You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/49659808-55a4-4c2d-b39a-895a2e586b2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.