Maddening problem copying WEB-INF

Ubuntu 20.04 LTS (brand new instance)
Open JDK 15.0.1
Tomcat 9.0.39
Lucee 5.3.7.47 WAR file

Never encountered this before - Setting up a new site. I have quickly and successfully installed the above stack (OS, JDK, Tomcat, Lucee). Open JDK, Tomcat and Lucee are in:

/opt/java 
/opt/tomcat
/opt/tomcat/webapps

Everything is working fine.

So I want to create two sites (multi homed) and I’ve done this several times. No problem.

Stop Tomcat, and then

cp -pR /opt/tomcat/webapps/ROOT/WEB-INF /var/www/www.SiteOne.com/web/WEB-INF

Restart Tomcat. Everything is fine, new site works, separate Lucee instance is perfect.

Time for site 2.

Stop Tomcat, and then

cp -pR /opt/tomcat/webapps/ROOT/WEB-INF /var/www/www.SiteTwo.com/web/WEB-INF

Restart Tomcat. Again, all previous installs are fine and working.

But… Site Two… when I try to get to the Lucee admin (https://www.SiteTwo.com/lucee/admin/server.cfm), I get a 404 error.

So In

/opt/tomcat/work/Catalina and in /opt/tomcat/conf/Catalina

All the right directories are there (main install, SiteOne, SiteTwo)

I’ve tried many things. I’ve tried deleting all of it, rebooting, reinstalling Lucee, same problem.

I’ve tried creating only SiteTwo and not creating SiteOne, same problem.

Permissions are tomcat:tomcat as on every other install, folders are 0755 and files are 0644 on all installs.

Anyone ever have this happen?

Hi derrick, I can’t really follow. Are you trying to

A) run two different Lucee/Tomcat instances (I mean, two Tomcat services), one for each site? Did you setup Tomcat with two catalaina_base then? Or
B) one running Tomcat instance that holds multiple hosts (for each site ) with same code base?
C) One website, one doc_base with one added host but multiple name aliases?

I can’t understand why are you copying the Web-Inf folder, because under normal circunstaces Tomcat creates them on behalf the server.xml configuration. if you just copy it, how would Tomcat know it should use it? You’ll need to tell us more about your setup. Where/how are you defining the doc_base of your sites, how does your server.xml look like?

Sure. I’ve actually multi homed CF/Lucee/Railo for years on multiple OS’s - Ubuntu 12, 14, 16, 18, and 20, as well as Mac OS from 10.4 through the present.

Process is:

  1. install JDK and Tomcat in /opt

  2. After testing Tomcat install is working, shutdown Tomcat and delete or rename the ROOT directory under Tomcat.

  3. Download Lucee.war (used to be Railo or Blue Dragon) and rename it ROOT.war

  4. Restart Tomcat, and the Lucee.war fie expands as the new ROOT directory under Tomcat/webapps

  5. Test Lucee install.

  6. Set up your virtual host or hosts in Apache (or Nginx?)

  7. Shutdown Tomcat, and copy the Tomcat/webapps/ROOT/WEB-INF to the virtual host root where you want to run CF. This allows a separate install of Lucee per virtual host site so that its settings and datasource or other properties, functions or extensions can be unique to the site.

  8. The /Tomcat/conf/server.xml file has the following contexts:

<!-- 
		=========
		start default host used for install
		========= 
		-->
		<Host name="tomcat.domainaname.com" appBase="webapps" unpackWARs="true" autoDeploy="true">
			<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs/0-lucee" prefix="tomcat.domainaname.com" maxDays="10" suffix=".log" pattern="%h %l %u %t &quot;%r&quot; %s %b" />
		</Host>
		
		<!-- 
		=========
		end default host
		========= 
		-->
		
		
		<!-- 
		=========
		start next host
		========= 
		-->
		<Host name="www.domainaname.com" appBase="webapps" unpackWARs="true" autoDeploy="true">
			<Context path="" docBase="/var/www/www.domainaname.com/web/" />
			<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs/0-lucee" prefix="www.domainaname.com" maxDays="10" suffix=".log" pattern="%h %l %u %t &quot;%r&quot; %s %b" />
		</Host>

I’ve done this many times, takes about 10 minutes and then about 2-3 minutes to do on a new site (copy and test).

Problem today is that everything is fine except for creating one very specific site. Because the domain name is sensitive, I have to use examples. So…

Base install of Lucee inside of Tomcat is fine, works.

Follow the process above (copy the WEB-INF folder to the virtual host root) and set up sub1.domainname.com - is fine, works

Follow the process above (copy the WEB-INF folder to the virtual host root) and set up sub2.domainname.com - is fine, works

Follow the process above (copy the WEB-INF folder to the virtual host root) and set up WWW.domainname.com - is not fine, trying to access the lucee admin results in a 404.

I’ve checked and double, triple checked the virtual host settings, everything. And I know that Tomcat is recognizing all instances of the virtual hosts because it’s creaing the various domain folders in the Catalina directories.

But still the virtual host for the subdomains work, but www does not.

any reason you’re not using mod_cfml which automates all this?

as @andreas said, WEB-INF is automatically created for every new webroot

I’d also highly recommend moving the WEB-INF outside the webroot

Good question. I suppose I’m not using it our of habit. But I do recall trying to use it at one point and not being able to make it work.

Also, the process above usually only takes a couple of minutes and has worked (not broken so far).

I’ll look into mod_cfml now.

So, I’ve gone through the process of installing mod_cfml. Tomcat still works.

Edit pending…

OK. Fixed errors on installing mod_cfml… Apache is loading, Tomcat manager is loading

And contexts are being created

But when I try to load a CF site I get this:

HTTP Status 404 – Not Found

Type Status Report

Message The requested resource [/lucee/admin/server.cfm] is not available

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

Do you still have manually created host entries in server.xml?

At that point no. I do now. And instead of the 404 from Tomcat, the browser just downloads the server.cfm page

That’s odd coz the server.cfm is under a tomcat mapping?

/opt/tomcat/conf/server.xml

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!-- Note:  A "Server" is not itself a "Container", so you may not
     define subcomponents such as "Valves" at this level.
     Documentation at /docs/config/server.html
 -->
 <!-- set shutdown port to -1 to prevent this from working (seciurity), or add a strong as shit password instead of -1 -->
<Server port="8005" shutdown="-1">
  <Listener className="org.apache.catalina.startup.VersionLoggerListener" />
  <!-- Security listener. Documentation at /docs/config/listeners.html
  <Listener className="org.apache.catalina.security.SecurityListener" />
  -->
  <!--APR library loader. Documentation at /docs/apr.html -->
  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
  <!-- Prevent memory leaks due to use of particular java/javax APIs-->
  <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
  <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
  <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />

  <!-- Global JNDI resources
       Documentation at /docs/jndi-resources-howto.html
  -->
  <GlobalNamingResources>
    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
    -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
  </GlobalNamingResources>

  <!-- A "Service" is a collection of one or more "Connectors" that share
       a single "Container" Note:  A "Service" is not itself a "Container",
       so you may not define subcomponents such as "Valves" at this level.
       Documentation at /docs/config/service.html
   -->
  <Service name="Catalina">

    <!--The connectors can use a shared executor, you can define one or more named thread pools-->
    <!--
    <Executor name="tomcatThreadPool" namePrefix="catalina-exec-"
        maxThreads="150" minSpareThreads="4"/>
    -->


    <!-- A "Connector" represents an endpoint by which requests are received
         and responses are returned. Documentation at :
         Java HTTP Connector: /docs/config/http.html
         Java AJP  Connector: /docs/config/ajp.html
         APR (HTTP/AJP) Connector: /docs/apr.html
         Define a non-SSL/TLS HTTP/1.1 Connector on port 8080
    -->
    <Connector port="8080" protocol="HTTP/1.1" 
               connectionTimeout="1800" 
               maxKeepAliveRequests="1" 
               redirectPort="8443" />
    <!-- A "Connector" using the shared thread pool-->
    <!--
    <Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
    -->
    <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443
         This connector uses the NIO implementation. The default
         SSLImplementation will depend on the presence of the APR/native
         library and the useOpenSSL attribute of the
         AprLifecycleListener.
         Either JSSE or OpenSSL style configuration may be used regardless of
         the SSLImplementation selected. JSSE style configuration is used below.
    -->
    <!--
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
               maxThreads="150" SSLEnabled="true">
        <SSLHostConfig>
            <Certificate certificateKeystoreFile="conf/localhost-rsa.jks"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>
    -->
    
    
    
     
    <!-- 
    =========
    start my ssl config for securing tomcat FOR TLS 1.2 AND 1.3
    ========= 
    -->
    <Connector port="8443" SSLEnabled="true" protocol="HTTP/1.1">
    	 <SSLHostConfig hostName="_default_" protocols="+TLSv1.2,+TLSv1.3" honorCipherOrder="true">
            <Certificate certificateFile="conf/cert.pem" certificateKeyFile="conf/privkey.pem" certificateChainFile="conf/chain.pem" certificateKeyPassword="" />
        </SSLHostConfig>
    </Connector>
    <!-- 
    =========
    end my ssl config for securing tomcat FOR TLS 1.2 AND 1.3
    ========= 
    -->




    
    <!-- Define a SSL/TLS HTTP/1.1 Connector on port 8443 with HTTP/2
         This connector uses the APR/native implementation which always uses
         OpenSSL for TLS.
         Either JSSE or OpenSSL style configuration may be used. OpenSSL style
         configuration is used below.
    -->
    <!--
    <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
               maxThreads="150" SSLEnabled="true" >
        <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
        <SSLHostConfig>
            <Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
                         certificateFile="conf/localhost-rsa-cert.pem"
                         certificateChainFile="conf/localhost-rsa-chain.pem"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>
    -->

    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <Connector port="8009" protocol="AJP/1.3" enableLookups="false"  redirectPort="8443" connectionTimeout="1800" maxKeepAliveRequests="1" secretRequired="false" address="127.0.0.1" URIEncoding="UTF-8" />


    <!-- An Engine represents the entry point (within Catalina) that processes
         every request.  The Engine implementation for Tomcat stand alone
         analyzes the HTTP headers included with the request, and passes them
         on to the appropriate Host (virtual host).
         Documentation at /docs/config/engine.html -->

    <!-- You should set jvmRoute to support load-balancing via AJP ie :
    <Engine name="Catalina" defaultHost="localhost" jvmRoute="jvm1">
    -->
    <Engine name="Catalina" defaultHost="tomcat.MyDomainName.com">

      <!--For clustering, please take a look at documentation at:
          /docs/cluster-howto.html  (simple how to)
          /docs/config/cluster.html (reference documentation) -->
      <!--
      <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
      -->

      <!-- Use the LockOutRealm to prevent attempts to guess user passwords
           via a brute-force attack -->
      <Realm className="org.apache.catalina.realm.LockOutRealm">
        <!-- This Realm uses the UserDatabase configured in the global JNDI
             resources under the key "UserDatabase".  Any edits
             that are performed against this UserDatabase are immediately
             available for use by the Realm.  -->
        <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
               resourceName="UserDatabase"/>
      </Realm>
      
      
		
		<!-- 
		=========
		start next host
		========= 
		-->
		<Host name="tomcat.MyDomainName.com" appBase="webapps" unpackWARs="true" autoDeploy="true">
			<Valve
className="mod_cfml.core" loggingEnabled="false" maxContexts="100" timeBetweenContexts="0" scanClassPaths="false" sharedKey="this is my cat sleeping" />
			<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs/0-lucee" prefix="tomcat.MyDomainName.com" maxDays="10" suffix=".log" pattern="%h %l %u %t &quot;%r&quot; %s %b" />
			
		</Host>
		
		<!-- 
		=========
		end next host
		========= 
		-->
		
		<!-- 
		=========
		start next host
		========= 
		-->
		<Host name="www.MyDomainName.com" appBase="webapps" unpackWARs="true" autoDeploy="true">
			<Valve
className="mod_cfml.core" loggingEnabled="false" maxContexts="100" timeBetweenContexts="0" scanClassPaths="false" sharedKey="this is my cat sleeping" />
			<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs/0-lucee" prefix="www.MyDomainName.com" maxDays="10" suffix=".log" pattern="%h %l %u %t &quot;%r&quot; %s %b" />
		</Host>
		
		<!-- 
		=========
		end next host
		========= 
		-->
		
		<!-- 
		=========
		start next host
		========= 
		-->
		<Host name="tasks.MyDomainName.com" appBase="webapps" unpackWARs="true" autoDeploy="true">
			<Valve
className="mod_cfml.core" loggingEnabled="false" maxContexts="100" timeBetweenContexts="0" scanClassPaths="false" sharedKey="this is my cat sleeping" />
			<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs/0-lucee" prefix="tasks.MyDomainName.com" maxDays="10" suffix=".log" pattern="%h %l %u %t &quot;%r&quot; %s %b" />
		</Host>
		
		<!-- 
		=========
		end next host
		========= 
		-->
      
      
    </Engine>
  </Service>
</Server>

/etc/apache2/mods-available/proxy.conf:

<IfModule mod_proxy.c>

	# If you want to use apache2 as a forward proxy, uncomment the
	# 'ProxyRequests On' line and the <Proxy *> block below.
	# WARNING: Be careful to restrict access inside the <Proxy *> block.
	# Open proxy servers are dangerous both to your network and to the
	# Internet at large.
	#
	# If you only want to use apache2 as a reverse proxy/gateway in
	# front of some web application server, you DON'T need
	# 'ProxyRequests On'.

	#ProxyRequests On
	#<Proxy *>
	#   AddDefaultCharset off
	#   Require all denied
	#   #Require local
	#</Proxy>

	# Enable/disable the handling of HTTP/1.1 "Via:" headers.
	# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
	# Set to one of: Off | On | Full | Block
	#ProxyVia Off
	
	
	# Start: Tomcat for Lucee configuration with proxy+ajp13:
	#
	# added [ProxyRequests Off] seems to have no effect, left it here because why not
	#
	ProxyRequests Off
	#
	#
	#
	ProxyPreserveHost On
	#
	#
	# Skip over these directories
	#
	ProxyPass /images !
	ProxyPass /lib !
	ProxyPass /mint !
	#
	# Skip over these fles types
	#
	ProxyPass ^/(.+\.js)$ !
	ProxyPass ^/(.+\.html)$ !
	ProxyPass ^/(.+\.htm)$ !
	ProxyPass ^/(.+\.php)$ !
	ProxyPass ^/(.+\.gif)$ !
	ProxyPass ^/(.+\.gz)$ !
	ProxyPass ^/(.+\.ico)$ !
	ProxyPass ^/(.+\.jpg)$ !
	ProxyPass ^/(.+\.jpeg)$ !
	ProxyPass ^/(.+\.mov)$ !
	ProxyPass ^/(.+\.png)$ !
	ProxyPass ^/(.+\.tar)$ !
	ProxyPass ^/(.+\.tif)$ !
	ProxyPass ^/(.+\.tiff)$ !
	ProxyPass ^/(.+\.pdf)$ !
	ProxyPass ^/(.+\.txt)$ !
	ProxyPass ^/(.+\.xml)$ !
	ProxyPass ^/(.+\.zip)$ !
	#
	# Main directives
	#
	ProxyPassMatch ^/(.+\.cf[cm])(/.*)?$ ajp://127.0.0.1:8009/$1$2
	ProxyPassMatch ^/(.+\.cfchart)(/.*)?$ ajp://127.0.0.1:8009/$1$2
	ProxyPassMatch ^/(.+\.cfml)(/.*)?$ ajp://127.0.0.1:8009/$1$2
	#
	# ProxyPassReverse does not matter in our case
	#
	ProxyPassReverse / ajp://127.0.0.1:8009/
	#
	#
	#
	# Alternate, minimum settings (remove everything above this) if you need to do this
	#
	# ProxyPreserveHost On
	# ProxyPassMatch ^/(.+.cf[cm])(/.)?$ ajp://127.0.0.1:8009/$1$2
	# ProxyPassMatch ^/((flashservices/gateway|messagebroker/|flex2gateway/|openamf/gateway/).) ajp://127.0.0.1:8009/$1
	#
	
	
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

apache2ctl -t -D DUMP_MODULES
Loaded Modules:
 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 unixd_module (static)
 access_compat_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 autoindex_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 expires_module (shared)
 filter_module (shared)
 headers_module (shared)
 jk_module (shared)
 mime_module (shared)
 mpm_event_module (shared)
 negotiation_module (shared)
 proxy_module (shared)
 proxy_ajp_module (shared)
 proxy_connect_module (shared)
 proxy_fcgi_module (shared)
 proxy_html_module (shared)
 proxy_http_module (shared)
 reqtimeout_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 socache_shmcb_module (shared)
 ssl_module (shared)
 unique_id_module (shared)
 xml2enc_module (shared)
 modcfml_module (shared)

And here is the tomcat log file for the site when I try to access the Lucee admin

99.174.95.113 - - [07/Nov/2020:10:31:33 -0500] "GET /lucee/admin/server.cfm HTTP/1.1" 302 -
99.174.95.113 - - [07/Nov/2020:10:31:33 -0500] "GET /lucee/admin/server.cfm?&__ HTTP/1.1" 302 -
99.174.95.113 - - [07/Nov/2020:10:31:34 -0500] "GET /lucee/admin/server.cfm?&__&__ HTTP/1.1" 302 -
99.174.95.113 - - [07/Nov/2020:10:31:35 -0500] "GET /lucee/admin/server.cfm?&__&__&__ HTTP/1.1" 302 -
99.174.95.113 - - [07/Nov/2020:10:31:35 -0500] "GET /lucee/admin/server.cfm?&__&__&__&__ HTTP/1.1" 302 -
99.174.95.113 - - [07/Nov/2020:10:31:36 -0500] "GET /lucee/admin/server.cfm?&__&__&__&__&__ HTTP/1.1" 302 -
99.174.95.113 - - [07/Nov/2020:10:31:36 -0500] "GET /lucee/admin/server.cfm?&__&__&__&__&__&__ HTTP/1.1" 302 -
99.174.95.113 - - [07/Nov/2020:10:31:37 -0500] "GET /lucee/admin/server.cfm?&__&__&__&__&__&__&__ HTTP/1.1" 302 -
99.174.95.113 - - [07/Nov/2020:10:31:38 -0500] "GET /lucee/admin/server.cfm?&__&__&__&__&__&__&__&__ HTTP/1.1" 302 -
99.174.95.113 - - [07/Nov/2020:10:31:38 -0500] "GET /lucee/admin/server.cfm?&__&__&__&__&__&__&__&__&__ HTTP/1.1" 302 -
99.174.95.113 - - [07/Nov/2020:10:31:39 -0500] "GET /lucee/admin/server.cfm?&__&__&__&__&__&__&__&__&__&__ HTTP/1.1" 302 -
99.174.95.113 - - [07/Nov/2020:10:31:39 -0500] "GET /lucee/admin/server.cfm?&__&__&__&__&__&__&__&__&__&__&__ HTTP/1.1" 302 -
99.174.95.113 - - [07/Nov/2020:10:31:40 -0500] "GET /lucee/admin/server.cfm?&__&__&__&__&__&__&__&__&__&__&__&__ HTTP/1.1" 302 -
99.174.95.113 - - [07/Nov/2020:10:31:41 -0500] "GET /lucee/admin/server.cfm?&__&__&__&__&__&__&__&__&__&__&__&__&__ HTTP/1.1" 302 -
99.174.95.113 - - [07/Nov/2020:10:31:41 -0500] "GET /lucee/admin/server.cfm?&__&__&__&__&__&__&__&__&__&__&__&__&__&__ HTTP/1.1" 302 -
99.174.95.113 - - [07/Nov/2020:10:31:42 -0500] "GET /lucee/admin/server.cfm?&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__ HTTP/1.1" 302 -
99.174.95.113 - - [07/Nov/2020:10:31:42 -0500] "GET /lucee/admin/server.cfm?&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__&__ HTTP/1.1" 302 -

And, finally - THANK YOU for even taking the time to help out. I know everyone is nuts these days. I am excited to try to get modcfml to work. But, I also am still puzzled by the site that I could not get to to work under my existing method. It’s almost as if it just didn’t like the domain or something. And yeah, I know that’s a nuts statement, but sometimes…

1 Like

These 302 redirections usually happen, when mod_,cfml isn’t capable of creating the contexts, it tries to create it and redirects to it. Then retries and retries. It’s very possible that the folders where the web-inf folder has to be created hasn’t the proper file permissions to create them. The user running Tomcat needs to have write access to those directories.

I think your setup is quite unusual. Never heard about this way of Lucee.jar deployment. I’ve always copied the Lucee jar to Tomcats lib, and after setup a lucee-server (for server-context) gets created. Webapps may serve an app in ROOT, but never heard of it having a Lucee.jar for deployment. But maybe this is just a setup I don’t know.

Did you see Igals Video about installing Lucee for different Tomcat Instances?

Lucee.war file. (Not jar file). War file expands into tomcat ROOT

D

Duh… Sorry, my bad!!!

I’d try to move web-inf folder out of the webroot just like @Zac_Spitzer recommended and make sure Tomcat has write access to the folder where they should be created. Good luck @derrickpeavy. It’s always great having different people with different minds here around. Love to read about such setups. :smiley:

1 Like

Thanks Andreas! I’m still stuck though. My set up works perfectly on my main server. And on a separate install at Digital Ocean as well. But for some reason, this one is not working.

Can you describe your set up process for running Lucee on multiple virtual hosts on one OS? I know that’s more rare these days, with the ability to spin up instances at various places (Amazon, Digital Ocean), but I still have hardware that I own and enjoy getting more life out of it, not to mention unlimited RAM. So, it’s nice to be able to just do a CP command on a new virtual host and voila, a new CF site.

Sure, that is the same setup I like most. My process is using the installer. If you want to see my setup process for Ubuntu, it’s shown here in the doc videos: https://docs.lucee.org/guides/installing-lucee/installation-linux/linux-ubuntu-quick-video-guide.html (I’m the creator of those videos). It’s done from a Win machine, but you can see the whole process done in the Ubuntu box.

It doesn’t show multiple virtual host setup, but the only additional steps you need is to add the new virtual host:

  1. add ‘<host name=“your-new-site.com” …>’ to tomcats server.xml
  2. restart tomcat service
  3. Add a new apache2 configuration file for your new virtualhost with the new servername and then activate the new site with apache2s enable site command $ sudo a2ensite your-conf-file-name.

That’s all. mod_cfml will do the rest for you.

Note: the process of moving web-inf folder outside of your webroot is explained at 5:43 of the Step 8 video.