Root path for sites not correct

Morning all, getting closer to having this run, but as I am moving my sites from Railo over, I am getting the yellow error screen with the following key message;
[/opt/lucee/tomcat/webapps/ROOT/file.iws]

I am trying to figure out and understand how Lucee is adding entries to this location as I believe this is the issue → /opt/lucee/tomcat/conf/Catalina

This server hosts a few sites each having a few alias’s. So I added a new site to apache, restarted both Lucee and Apache, but when I look in that Catalina folder, that domain is not there (so naturally the default is the tomcat/webapps folder) so it fails.

I have a few other naming issues as well. One site I added is there with the correct name of the site, another one is not. Here are 2 examples. Some sites use the same codebase, but the brand domain dictates the CSS. Others are a bit more unique, but here are 2 examples.

  1. secure.brand1.com and secure.brand2.com. Both use different apache config files, same codebase. I moved DNS for dev-secure.brand1.com over, and in that tomcat/config/Catalina folder I have an entry secure-brand1-com-secure-brand-confl1. (the dev is not there) I hit the URL dev-secure.brand1.com and get the yellow root error.

  2. A little more odd, but I have another micro site that does the same thing, so its all under one apache config with ServerAlias. So, I have mobile.brand1.com, mobile.brand2.com. Again, DNS for brand1 is moved, and I have one entry in the tomcat/conf folder named mobile-brand2-com-mobile-brand2-confl1.

So I am trying to both understand the naming of those folders, how they get created and why all the sites I move there all point to the tomcat/webapp as the root and not where they should. I don’t remember adding anything to the Lucee admin, but I need to define all the sites and their root someplace and I missing that!

Thanks.

OS: Ubuntu 20.04LTS
Lucee Version: 5.3.9.133

If you are using Lucee in Conjunction with Apache HTTPD (Recommended) then the path for your files would be in your sites-enabled.

you should have something like
/etc/apache2/sites-enabled /site1.conf
/etc/apache2sites-enabled/site2.conf

Each site should have a proper vhost setup.

After you get those working with static html, you then can add this to each vhost

Allow from 127.0.0.1
  </proxy>
    ProxyPreserveHost On
    ProxyPassMatch ^/(.+\.cf[cm])(/.*)?$ http://127.0.0.1:8888/$1$2
    ProxyPassMatch ^/(.+\.cfchart)(/.*)?$ http://127.0.0.1:8888/$1$2
    ProxyPassMatch ^/(.+\.cfml)(/.*)?$ http://127.0.0.1:8888/$1$2
    # optional mappings
    #ProxyPassMatch ^/flex2gateway/(.*)$ http://127.0.0.1:8888/flex2gateway/$1
    #ProxyPassMatch ^/messagebroker/(.*)$ http://127.0.0.1:8888/messagebroker/$1
    #ProxyPassMatch ^/flashservices/gateway(.*)$ http://127.0.0.1:8888/flashservices/gateway$1
    #ProxyPassMatch ^/openamf/gateway/(.*)$ http://127.0.0.1:8888/openamf/gateway/$1
    #ProxyPassMatch ^/rest/(.*)$ http://127.0.0.1:8888/rest/$1
    ProxyPassReverse / http://127.0.0.1:8888/
</ifmodule>

Note, you will need to add your custom file types if you want Lucee to serve them,
Save the files restart apache httpd.

Reference

Thanks for the prompt reply. I think the issue was brower caching, as with incognito things came up as expected. I am still a bit unsure on the naming of the files in the lucee/tomcat/conf/catalina folder as there a bit odd, but the good is that those appear to be working now.

Thanks again for the prompt reply, and hopefully the others will be a bit tougher :slight_smile:

Cool!

Its open source so as long as it works, it works.

Sure there are all kinds of methodologies and everyone can get it what actually performs better, but in the end, does it work and is it secure… If you can answer yes to both you are doing great.

I think you are having issues with mod_cfml because you are using custom files with extensions “.iws” (as you mentioned in your previous posts).

What mod_cfml does is: it identifies new added hosts/sites on apache2 and “magically” creates all the settings for you in Tomcat. But mod_cfml doesn’t know anything about your “.iws” files, and it surely doesn’t know these are alias for .cfm files. So it just will ignore those files and skip everything. That means, as long as you are requesting those .iws files, nothing will happen on Tomcats side and your webapp will be the default root.

To explain all the manual settings would take way to long. The quickest solution is: add an empty index.cfm file and call it thorugh apache2 port 80, wait for mod_cfml to create the context and it will create the context files for you and set everything up.