Parse other file extension - migrating to new OS/application

Morning all, migrating from an old version of Railo, we have a custom suffix .iws - and I am not sure what else is needed to have Lucee process these as CFM pages.

I followed this thread here but this is on windows, I am running on Linux (Ubuntu 20.04). I downloaded the express install, so not sure if that includes the “boncode connector” , but I did make the 2 updates in the web,xml file but its still showing as plain text.

I am also looking at the old Railo as I grep for that file extension - I see this file;
/opt/railo/tomcat/conf/uriworkermap.properties

which has the extentions for CFM but also has this;
uriworkermap.properties:/*.iws=ajp13

but that file doesn’t exist in the new install.

Don’t forget to tell us about your stack!

OS: Ubuntu 20.04
Java Version: ???
Tomcat Version: ???
Lucee Version: 5.3.9.133

I am not sure on the java/tomcat as I believe they come pre-packaged with the express install, but could be mistaken.

Thanks

The express files are more for testing and development. To install Lucee and connect it to a fronted apache webserver, please use the installer for Linux.

Boncode is on Windows only.

For installing Lucee and connct it to Apache2 follow the Installing Lucee on Ubuntu 20.04 LTS Server Apache2 - Video Guide.

More information about each version, please see https://docs.lucee.org/guides/installing-lucee/download-and-install.html

However, you may be able to install Lucee using the Express version, but you will need to connect it manually everywhere. Use the Linux Installer.

Hope this helps a little.

Ok, clearly my bad as I did the linux installer (realized when I downloaded and the file was the same) and did remember it asking about the apache locations. I should have realized it when I was able to login to the admin, do my datasource setups, etc.

So, really the only thing I can’t seem to find is really the original question was. We use a custom file suffix, (.iws). So, I am trying to see where in the admin (or config’s) I can tell apache/lucee, hey here is file.iws (treat it like a CFM page) as I said, Railo had it in 2 places;

  1. A file (/opt/railo/tomcat/conf/uriworkermap.properties) where you could put that, but that file doesn’t exist

  2. /opt/railo/tomcat/conf/web.xml (same file does exist in lucee) but under the serverlet mapping, so I did add it here and it looks like this;

<servlet-mapping>
    <servlet-name>CFMLServlet</servlet-name>
    <url-pattern>*.cfm</url-pattern>
    <url-pattern>*.cfml</url-pattern>
    <url-pattern>*.cfc</url-pattern>
    <url-pattern>*.iws</url-pattern>

But no luck, still just shows the plain text, so still fighting to get lucee to treat those files as CFM files.

I think, You don’t need the uriworkermap anymore at all. I feel not having set anything in the uriworkermap file like in a decade. You just need to do the changes in the servlet mapping directive, and you are done with setting up Tomcat to work with your .iws files. Just try to run such a file (after restart) through port 8888 and see if its running correctly. You still need to add the mime type as shown in the other post (from the link above that you already know).

When does that show up? When connecting through apache2 on port 80 or Tomcat directly on port 8888?

After you have tested that your .iws files run directly on port 8888, then you can connect Apache2 with Lucee. You need to intercept the .iws file requests on apsche2 and pass it to Tomcat. To do this, go to
/etc/apache2/apache2.conf and find the mod_proxy directive and add the ProxyPassMatch line to match your .iws file…

<IfModule mod_proxy.c>
	ProxyPreserveHost On
	ProxyPassMatch ^/(.+\.cf[cm])(/.*)?$ http://127.0.0.1:8888/$1$2
	ProxyPassMatch ^/(.+\.cfml)(/.*)?$ http://127.0.0.1:8888/$1$2
    ProxyPassMatch ^/(.+\.iws)(/.*)?$ http://127.0.0.1:8888/$1$2
...

Then restart apache2 and you should be ready to go.

That was the missing part. Thanks for the help and direction!

1 Like