CFM adresses go the wrong directory (apache)

I have the application located in that directory : var/www/C006/site/index.cfm
So, this is declared in the apache .conf file
<VirtualHost *:80>
DocumentRoot /var/www/C006/site
DirectoryIndex index.cfm

<Directory /var/www/C006/site>
    require all granted
    AllowOverride All

When I type “” in the navigator ,
It is looking in /var/www/
instead of var/www/C006/site/
I get this error
Page /index.cfm [/var/www/index.cfm] not found

Is there something to do in Lucee administration ?

Don’t forget to tell us about your stack!
Linux debian 10
php 7.3
apache 2.4

Looks like tomcat/Lucee doesn’t know where your context is sitting. How did you install Lucee? Did you enable/install mod_cfml?

I did the installation a long time ago.
I do not remember anything about mod_cfml
Under windows, I remember I did mod_cfml

How to do that ? what do I need to do for mod_cfml (under linux)
Thanks for help.

You need a proxy context for your Virtual Host so Lucee knows its suppose to use a different webapp root.

use pastebin to post your full httpd.conf

I do not understand.
Do you want me to upload a file named “httpd.conf” ?
if yes, where is this file ?
Or, how can I make a “proxy context for your Virtual Host”
This should be a basic problem.
Thanks for help, it is very frustrating.
A year, I try to use Lucee. I am almost at end.

It’s very,very difficult for us to know what is wrong with your setup, because there are lots of different ways to install Lucee. If even you can’t remember how you did install Lucee, how should we know/guess what is possibly going wrong with your setup? We need to know more about it. If you’ve used Lucees default linux installer, mod_cfml should have been shipped and installed with Lucee. What mod_cfml does is: it configures tomcat automatically according your apache virtual host entries. If mod_cfml wasn’t installed, you need to add the new site manually in tomcats configuration file /opt/lucee/tomcat/conf/server.xml by adding a host entry with the name, e.g.:

<Host name="" 
appBase="webapps" unpackWARs="true" autoDeploy="true">

and add a context configuration file /opt/lucee/tomcat/conf/Catalina/ that contains the context directive that points its docBase to /var/www/C006/site:

<Context docBase="/var/www/C006/site" />

Make sure tomcat has read permission to read those files and also write permissions to your directory /var/www/C006/site You’ll also need to restart Lucee.

The installer automates a lot and makes lots of things easier. But we really don’t know how and what you’ve installed on your machine, or if something got stuck at some point. We can only guess.

I thought Debian used sites-enabled directory and the a2ensite script? Did you manually add to apache.conf? IT sounds like the default site is running.

I think I did install through the installer (automatic)
I can’t remerber well, I did it almost 2 years ago.
When I get time, I resolve problems, then I continue.
Now it is about done.
I tried
adding these, in server.xml


in root.cfm
And that give a Tomcat error message

État HTTP 404 – Non trouvé

Type Rapport d’état
message Not found
description La ressource demandée n’est pas disponible.

Apache Tomcat/9.0.24

In Apache I have sites-enabled directory with site declared with a2ensite script. Right.

I Upload an print-screen of the “catalina” directory. This may help.
I am wondering why Lucee see all sites in “var/www”
If working with HTML, it does work.

Thanks for any help.
and another print-screen with Lucee directories and the mod_cfml.
(I used mod_cfml , but under windows, some years ago)

I found back, how Lucee was installed ,
it was through these command lines
command line :
$ cd [download location]
$ chmod 744 lucee-[version]-linux-installer.bin
$ sudo ./lucee-[version]-linux-installer.bin

Thanks for help.

This is really strange, I can’t really tell what is going on with your setup. Looks like you have mod_cfml installed, but not active. Is the mod_cfml valve set as comment in your host entry of the server.xml? I really can’t say…

I can’t see any content of the server.xml. Can you please add the code with the code button of the editor </> to this topic please?

If mod_cfml is enabled, you don’t need to add anything to server.xml manualy, and you also don’t need to add a ROOT.xml, because mod_cfml does that for you. But I can’t really say what is going on with your setup, just guess.

Did you mean ROOT.xml or root.cfm? What I was always talking about was ROOT.xml, not root.cfm. Also, I can’t see any posted content, maybe because you’ve added the code without the editors code button </> to the post. However, if mod_cfml is enabled and active, you don’t need to do anything with the ROOT.xml, because mod_cfml does all that stuff for you.

Maybe because it is setup to act as your default docBase. If you have mod_cfml enabled the correct docBase should have been added correctly according to apache2 virtual host configuration.

Another question: Why did you add your virtual host to apache.conf (you’ve mentioned that in your first post), when in apache2 that file should be in sites-available, and then the site is enabled with the a2ensite host-name command, just like @kabutotx said above?

What does the catalina log at /opt/lucee/tomcat/logs tell you? There should be some information with a hint in it.

The problem is that we can only guess and not really know what is wrong with your setup.

The situation is worst.
Now I have this message
“Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Apache/2.4.38 (Debian) Server at Port 443”

I tried to Stop and Start Lucee at command mode, and I get this message
see print_sreen attached.

This after reboot of the server.
Any idea of what is happening ? and what to do.?
Thanks for help.

I tried # killall java, but it does not know killall.

This happens if Lucee isn’t running or couldn’t start. This can be for example if you break server.xml with mal formatted content (e.g. wrong commenting etc).

What does the catalina log at /opt/lucee/tomcat/logs/ tell you? There should be some information with a hint in it?

Thank you very much,
Lucee is back, something it did not like in server.xml (in coments).
Back to my original problem.

All is getting better. (I do not know why).

Else, Sub-Domain, does not work.
It is declared as a Virtual Host in Apache, but go to the main domain adress.

<VirtualHost *:80>
    DocumentRoot /var/www/C006/site/cinema/
    DirectoryIndex cinema.cfm

    <Directory /var/www/C006/site/cinema/>
        require all granted
        AllowOverride All

And it goes to that adress
instead of
Page /cinema.cfm [/var/www/C006/site/cinema.cfm] not found

Thanks for any idea and help ?
Is there something special to do with sub-domains ?


Glad you are making progress! I still don’t know if you have mod_cfml enabled or not, so I’m just guessing what could be wrong. My guess is, you’ve mod_cfml enabled, so my assumption is, you’ve added that sub-domain and changed the webroot in your virtual host after mod_cfml detected that. Here is what I think:

Look into your:
/opt/lucee/tomcat/conf/Catalina/ and there you should see a folder with the new sub domain for In that folder you should see the ROOT.xml (that is the context configuration file). Open it and take a look. You’ll probably see that the docBase is docBase="/var/www/C006/site" with cinema missing. If so, you need to change it to docBase="/var/www/C006/site/cinema"

A problem I see is, that might cause double context and might get into conflicting situations, because you are adding files/context from one webroot into another (that means “cinema” is webroot of, but also a part of That might be a problem (nested contexts). You need to keep this in mind. Best would be to have each wwwroot physically separated. But of course, it all depends on your setup and needs. There are other solutions, but for now that is what I’d try.

Thanks for your assistance,
All is working now.
I did a2ensite (but was already done)
I did restart Lucee

All is good
2 main domains and 1 sub-domain,
I think I have now all my needs.
(for your information , with access (mdb) datasource)
Thanks again, Pierre.

1 Like

That"s good news Pierre! Glad you figured all out and now you have Lucee up and running. Even if you still don’t understand everything, how Lucee/Tomcat,Apache2 works together, you will get more familiar with it from time to time. In case you have any question or further issues, please post it to this community. :smiley:

I am very pleased to have this environment running.
I did use Lucee some years ago under windows and IIS
and I am a Coldfusion developper since 2003. (but now I am 71 years old)
Lucee is great.
Thanks for all.


I come back to you,
I set up a new web-site :
with this virtual host

<VirtualHost *:80>
    DocumentRoot /var/www/C020/site/

    <Directory /var/www/C020/site/>
        require all granted
        AllowOverride All

RewriteEngine on
RewriteCond %{SERVER_NAME} [OR]
RewriteCond %{SERVER_NAME}
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

So it should go to /var/www/C020/site/
and NO, it goes to /var/www/C006/site/ (the first domain I set up)
I enabled the site in apache
I restart apache
I restart Lucee.
Same wrong adress.
Do you have any idea ? Thanks. (something I forgot ?)

Now you just need to verify if mod_cfml has setup tomcats configuration correctly. That’s what I’d do:

Look into your:
/opt/lucee/tomcat/conf/Catalina/ and there you should see a folder with the new domain for . In that folder you should see the ROOT.xml (that is the context configuration file). Open it and take a look. You’ll probably see that the docBase is docBase="/var/www/C006/site". If so, you need to change it to docBase="/var/www/C020/site/"

I looked in Catalina,
and there is NO file called with that new domain :
That should be the reason.
What is creating this file in Catalina ?