Multiple sites on Lucee / CentOS7


I’ve installed Lucee/Tomcat, Apache, Mysql on a CentOS 7 server (vps). It’s all working fine my CF application.

But I want to upload another application in the same server. Is that possible? What should I do?
I just changed the /opt/lucee/tomcat/conf/server.xml file (adding new site), created a new folder on /opt/lucee/tomcat/webapps/root/app1 and /app2 and that didn’t worked for me. I read some stuff but couldn’t get that done. Anyone made that work?


in the server.xml define a host for each site, there’s probably other things to do but this is a start

  <Host name="siteOne" appBase="webapps"
  		unpackWARs="true" autoDeploy="true"
  		xmlValidation="false" xmlNamespaceAware="false">
  		<Context path="" docBase="/var/www/siteOne" />

  <Host name="siteTwo" appBase="webapps"
  		unpackWARs="true" autoDeploy="true"
  		xmlValidation="false" xmlNamespaceAware="false">
  		<Context path="" docBase="/var/www/siteTwo" />

Yes. I’ve already made that. Didn’t worked.

Then should I restart the server and “WEB-INF” will be created or should I copy the WEB-INF and put into /siteOne and /siteTwo ?

Anything else maybe? Thanks.

You should explain in more detail what you mean when you say “that didn’t work”.

Yes, many of us do that on a regular basis.

I never used apache but in IIS, you also have to create the website in IIS…


As mafimo wrote, for tomcat and lucee, add an entry for each site in /opt/lucee/tomcat/conf/server.xml
For apache add an entry for each site in /etc/httpd/conf.d by creating a new conf-file for each site.

The WEB-INF folder will be created if you wait a few minutes after the restart of the web services.
systemctl restart httpd
systemctl restart lucee_ctl

After this the lucee server and web administrator can be reached for the new site.


I’ve made that on server.xml but didn’t create /etc/httpd/conf.d. Do you know how to do that? Not sure how to create that.

Seems that Lucee isn’t running anymore, it’s weird, not sure what’s happening.

When I try to access: http://[domain]/lucee/admin/server.cfm then it’s showing “Service Unavailable”.

And when I try to access any http://IP_adress:8888/ seems also not working.

When I type systemctl status lucee_ctl showing Active. What should I am doing wrong?

Or maybe do you have any “step by step” tutorial to instal lucee on CentOS with multiple sites?


First of all, ignore httpd until you are able to make it work with the Tomcat port, e.g. 8888. Once it’s running properly when you connect directly to Tomcat, you can fix any issues with httpd.

Did you check the log files? Check the Tomcat log files first. There might be an error there that prevents Lucee from starting up. The default location for the logs is at {tomcat}/logs but there’s a good chance that in your setup they are somewhere else. Find the “catalina out” and “catalina err” or “stdout” and “stderr” (exact filenames may vary depending on setup) and inspect them for errors.

The content of the conf file /etc/httpd/conf.d/[domain].conf could be like this:

<VirtualHost *:80>
  ServerName [domain]
  ServerAlias www.[domain]
  DocumentRoot /var/www/vhosts/[domain]
  CustomLog /var/log/httpd/vhosts/[domain]/access_log combined
  ErrorLog /var/log/httpd/vhosts/[domain]/error_log
  DirectoryIndex index.cfm index.html index.htm

Be sure that the directories exist. If not the apache webserver won’t start.

You can use:

apachectl configtest



Seems that if I put anything into /opt/lucee/tomcat/conf/server.xml then Lucee seems not to run. If I clear server.xml then it runs OK.

Now Lucee is running alright. But couldn’t get multiple sites yet. Just one CFM site on /opt/lucee/tomcat/webapps/ROOT/ folder.

I tried to create /opt/lucee/tomcat/webapps/ROOT/site1 and /opt/lucee/tomcat/webapps/ROOT/site2 and put WEB-INF in each folders but didn’t work (feels like Lucee doens’t run if change server.xml)

I tried something like that:

  <Host name="" appBase="webapps"
  		unpackWARs="true" autoDeploy="true"
  		xmlValidation="false" xmlNamespaceAware="false">
  		<Context path="" docBase="/siteOne/" />

  <Host name="" appBase="webapps"
  		unpackWARs="true" autoDeploy="true"
  		xmlValidation="false" xmlNamespaceAware="false">
  		<Context path="" docBase="/siteTwo/" />

And seems that Lucee isn’t getting ready to run with that.

Anyone would have any step by step to start basic Lucee installation with multiple sites?

I appreciate all the help you guys gave to me till now.

Then you’re either messing up the XML format, or when you save the file you change the owner/group and Lucee loses its read permission.

The logs will reveal more.

If by not starting up you see the “white screen of death” when loading the sites in a browser, Lucee started but something is wrong with the tomcat - apache setup. If Lucee can’t start, check the logs.

I don’t think there is a centos7+Lucee+Apache guide out there explaining everything step by step… I have a few sites running on centos6+Lucee+Apache VPS using the virtualmin control panel, virtualmin is probably another level of complexity you don’t want to know about …

These were written for Railo but the config file setup is still pretty much the same

look for “Manually Connecting Apache Hosts to Tomcat/Railo (Tomcat Side)”