Lucee 5 and Cpanel

We are new to Lucee. Been using Coldfusion and cpanel for 10+ years on Linux CentOS 6 +
Has anyone done this on Lucee 5, as 4.5 works, but our hosting guys are having trouble getting hooks etc to work on 5. They are not sure they can get it to work on 5, which mean we would have to go back to Coldfusion.

I don’t know what “hooks” are. Is that something specific to CPanel? You’ll need to explain further.

basicially once we have upgraded from 4.2 to 5 we get issues now when accessing the server part http://85.118.237.125:8888/lucee/admin/server.cfm

once we fix that we can see if the cpanel account creation will work

  1. What are “hooks”? You still haven’t answered that
  2. What “issues” did you get? The URL you provided doesn’t load anything and I have no idea what you’re seeing
  3. Noone can really help you until you provide vastly more information to us :slight_smile:
Lucee 5.2.3.35 Error (security)
Message	can't access [/opt/railo/tomcat/lucee-server/context/userdata] directory must be inside [/opt/railo/tomcat/webapps/ROOT]
Detail	access is prohibited by security manager
Stacktrace	The Error Occurred in
/admin/adminfunctions.cfc: line 97 
called from /admin/adminfunctions.cfc: line 74 
called from /admin/adminfunctions.cfc: line 52 
called from /admin/adminfunctions.cfc: line 23 
called from /admin/adminfunctions.cfc: line 29 
called from /admin/web.cfm: line 324 
called from /admin/server.cfm: line 2 
Java Stacktrace	lucee.runtime.exp.SecurityException: can't access [/opt/railo/tomcat/lucee-server/context/userdata] directory must be inside [/opt/railo/tomcat/webapps/ROOT]
 	at lucee.runtime.security.SecurityManagerImpl.checkFileLocation(SecurityManagerImpl.java:330)
 	at lucee.runtime.security.SecurityManagerImpl.checkFileLocation(SecurityManagerImpl.java:301)
 	at lucee.runtime.functions.system.DirectoryExists.call(DirectoryExists.java:49)
 	at lucee.runtime.functions.system.DirectoryExists.call(DirectoryExists.java:33)
 	at adminfunctions_cfc$cf.udfCall(/admin/adminfunctions.cfc:97)
 	at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:108)
 	at lucee.runtime.type.UDFImpl._call(UDFImpl.java:367)
 	at lucee.runtime.type.UDFImpl.call(UDFImpl.java:227)
 	at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:772)
 	at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:758)
 	at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1698)
 	at adminfunctions_cfc$cf.udfCall(/admin/adminfunctions.cfc:74)
 	at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:108)
 	at lucee.runtime.type.UDFImpl._call(UDFImpl.java:367)
 	at lucee.runtime.type.UDFImpl.call(UDFImpl.java:227)
 	at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:772)
 	at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:758)
 	at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1698)
 	at adminfunctions_cfc$cf.udfCall(/admin/adminfunctions.cfc:52)
 	at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:108)
 	at lucee.runtime.type.UDFImpl._call(UDFImpl.java:367)
 	at lucee.runtime.type.UDFImpl.call(UDFImpl.java:227)
 	at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:772)
 	at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:758)
 	at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1698)
 	at adminfunctions_cfc$cf.udfCall(/admin/adminfunctions.cfc:23)
 	at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:108)
 	at lucee.runtime.type.UDFImpl._call(UDFImpl.java:367)
 	at lucee.runtime.type.UDFImpl.call(UDFImpl.java:227)
 	at lucee.runtime.type.scope.UndefinedImpl.call(UndefinedImpl.java:772)
 	at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:758)
 	at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1698)
 	at adminfunctions_cfc$cf.udfCall(/admin/adminfunctions.cfc:29)
 	at lucee.runtime.type.UDFImpl.implementation(UDFImpl.java:108)
 	at lucee.runtime.type.UDFImpl._call(UDFImpl.java:367)
 	at lucee.runtime.type.UDFImpl.call(UDFImpl.java:227)
 	at lucee.runtime.ComponentImpl._call(ComponentImpl.java:697)
 	at lucee.runtime.ComponentImpl._call(ComponentImpl.java:580)
 	at lucee.runtime.ComponentImpl.call(ComponentImpl.java:1918)
 	at lucee.runtime.util.VariableUtilImpl.callFunctionWithoutNamedValues(VariableUtilImpl.java:758)
 	at lucee.runtime.PageContextImpl.getFunction(PageContextImpl.java:1698)
 	at web_cfm$cf.call(/admin/web.cfm:324)
 	at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:939)
 	at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:833)
 	at lucee.runtime.PageContextImpl.doInclude(PageContextImpl.java:817)
 	at server_cfm$cf.call(/admin/server.cfm:2)
 	at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:939)
 	at lucee.runtime.PageContextImpl._doInclude(PageContextImpl.java:833)
 	at lucee.runtime.listener.ModernAppListener._onRequest(ModernAppListener.java:224)
 	at lucee.runtime.listener.MixedAppListener.onRequest(MixedAppListener.java:43)
 	at lucee.runtime.PageContextImpl.execute(PageContextImpl.java:2405)
 	at lucee.runtime.PageContextImpl._execute(PageContextImpl.java:2395)
 	at lucee.runtime.PageContextImpl.executeCFML(PageContextImpl.java:2363)
 	at lucee.runtime.engine.Request.exe(Request.java:46)
 	at lucee.runtime.engine.CFMLEngineImpl._service(CFMLEngineImpl.java:1048)
 	at lucee.runtime.engine.CFMLEngineImpl.serviceCFML(CFMLEngineImpl.java:996)
 	at lucee.loader.engine.CFMLEngineWrapper.serviceCFML(CFMLEngineWrapper.java:102)
 	at lucee.loader.servlet.CFMLServlet.service(CFMLServlet.java:51)
 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
 	at mod_cfml.core.invoke(core.java:132)
 	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
 	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
 	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
 	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 	at java.lang.Thread.run(Thread.java:745)

What’s up with the “railo” folder? Is this a Railo or Lucee install? If it’s an old Railo install you upgraded, consider just doing a fresh Lucee install. Regarding that error, that’s a new one on me. That lucee context is never inside the web root anyway. Do you have any security settings you’ve changed in Lucee regarding what files can be accessed? If this was an old Railo install, it’s possible some internal things changed in such a way that your security rules don’t work any longer.

Looks like it wont work with cpanel as all the cpanel plugins were built for ralio and have not been updated

Or does anyone have up to date Cpanel plugins

Do you know exactly what the CPanel plugins do to the Railo installation? Can you provide the server context config (XML) file? I’m still wondering my last question which is whether custom security rules have been applied to the server in regards to what folders are accessible.


that’s what it does
we have upgraded from 4.2 to 5 and now it doesn’t work
I think the issue lies with going out of the 4.X to 5 everythings kinda changed so the account hooks won’t work

@Jordan_Michaels Can you comment if that project is still maintained or if there’s a new project for Lucee 5?

1 Like

I haven’t had time to properly maintain this as a “project” but the “hooks” have very little to do with the Lucee version you’re running.

A “hook” in cPanel speak is a script that runs at a specific time for a specific job (like when you’re creating a new account in cPanel). The hooks that the Lucee4cPanel project use will create directories, update configs, and assign permissions to things that the Railo/Lucee instance needs. Permissions need to be specific within a cPanel environment. I developed this project around the time of Railo 4, so that’s why you’re seeing the Railo directories there.

Some of the technicians on the Vivio team have been updating this on our own installs, and have been replacing the Railo instance with Lucee. I just talked with one of our technicians who frequently performs the new system builds and he said he HAS got it working with Lucee 5 and the latest build of cPanel, however, since I don’t do the builds myself, I’m not sure what steps our technicians take to make things work.

William, looking over the error you posted, it looks like a permissions error. I’m not sure what you’re hitting or how you performed your upgrade, so I can’t give very specific direction, but you probably only need to tweak something small with the permissions to get it working.

Vivio works with several hosting providers that have servers located here. If the server you’re provider is having trouble with is located here, you could have your hosting provider contact us directly to get this taken care of.

2 Likes

Would Vivio provided their Lucee5cPanel plugins. We have been using our hosting company for 14 years now and we want to stay with them.

The only reason we installed version 4 was see if we could get the cpanel working then upgrade to 5. Ideally we would do a fresh Lucee 5 install not an upgrade. We need Lucee 5 to work with a control panel like cPanel, to be an alternative to Coldfusion.

Hey William,

The name is a play on the words “Railo for cPanel” and “Lucee for cPanel”, so the number 4 in “Lucee4cPanel” in the name doesn’t actually have anything to do with the version number of Railo or Lucee.

While I wasn’t suggesting that you switch hosting providers (only that there might already be some sort of relationship), I do love that you’re being so loyal. :wink: I greatly respect that. Let me see what kind of documentation we have on our setup process and I’ll get back to you shortly.

1 Like

It isn’t much, but this is what I found in our in-house docs:

Install Lucee on cPanel w/Apache 2.4
Originally, these instructions assumed you already have a running environment where mod_cfml has been successfully installed. It has been modified to included installing it though. Notes about possible issues have been added as well.

  • Install Lucee & follow the prompts and enter the appropriate information. Hint: The auto-detected apache paths may be wrong
  • You’ll get an error once it’s done, and a prompt to “Press [Enter] to continue:”
  • Navigate to /opt/lucee/sys/mod_cfml move the centos-httpd24-x64 to centos7-httpd24-x64 (If this isn’t installed Install mod_cfml first):

sudo mv /opt/lucee/sys/mod_cfml/centos-httpd24-x64 /opt/lucee/sys/mod_cfml/centos7-httpd24-x64

  • The mod_cfml.so that is bundled with Railo/Lucee was built on a CentOS7 machine which uses a different glibc version than does CentOS6. You’ll have to build your own. View instructions below on how to compile and install mod_cfml.so
  • Copy the compiled mod_cfml.so file to the /opt/lucee/sys/mod_cfml/centos-httpd24-x64 directory
  • If the connector/proxy instructions have been added to the bottom of the /usr/local/apache/conf/httpd.conf file, move them into /usr/local/apache/conf/includes/pre_virtualhost_global.conf
  • Change the path of the shared module in the pre_virtualhost_global.conf file from

LoadModule modcfml_module modules/mod_cfml.so

to

LoadModule modcfml_module /opt/lucee/sys/mod_cfml/centos6-httpd24-x64/mod_cfml.so

  • Just for good measure (this isn’t required, any longer, I just think it’s a good idea to include) rebuild the http conf:

sudo /scripts/rebuildhttpdconf

  • Verify the httpd.conf doesn’t error

sudo /usr/local/apache/bin/apachectl -t

  • Restart apache

sudo service httpd restart

  • Fin

Install mod_cfml.so

Stolen from: http://www.modcfml.org/index.cfm/install/web-server-components/apache-on-centos/

Assumes you already have unzip, httpd-devel, make, and gcc installed.

  • Download the project and install it

wget -O mod_cfml-master.zip https://github.com/utdream/mod_cfml/archive/master.zip
unzip mod_cfml-master.zip
cd ./mod_cfml-master/C
sudo make
sudo make install

  • Put the connector in the apache config file

It’s recommended to NOT put this in the bottom of the httpd.conf or apache.conf file. Instead put it in its
own config file in /etc/httpd/conf.d/ instead, for example:

LoadModule modcfml_module modules/mod_cfml.so
CFMLHandlers “.cfm .cfc .cfml”
ModCFML_SharedKey “secret key also set in the Tomcat valve config”
<Proxy >
Allow from 127.0.0.1

ProxyPreserveHost On
ProxyPassMatch ^/(.+.cf[cm])(/.
)?$ http://127.0.0.1:8888/$1$2
ProxyPassMatch ^/(.+.cfml)(/.*)?$ http://127.0.0.1:8888/$1$2


So… there you go. I don’t know how helpful that will be for you, but it’s the guide our guys put together for themselves. I hope you find it useful until such time as I can turn this into a proper project again.

4 Likes

Thanks very much for your help we will try this on Monday.

What are people using as Control panel if they are not using cpanel, as Lucee does not have up to date cpanel integration. Is Cpanel integration going to be added and maintained in the future for Lucee 5? As this is real show stopper for us, as our hosting company quys are Very reluctant to install Lucee if Cpanel is not fully supported.

I find it bit odd that Cpanel is not fully supported as cPanel is regarded as the most popular and most widely used control panel, and it is included in the hosting plan of many hosting providers.

Is Cpanel integration going to be added and maintained in the future for Lucee 5?

I would say no, little chance of this. Why? Honestly, there are very few companies using Lucee in a hosting environment so demand is quite small. As an open source non-profit, Lucee has a humongous backlog of bug and enhancements on our plate and a CPanel integration just wouldn’t make sense for us to sink a lot of money into supporting.

Now, that said, there’s two ways this can change. The first is if a company wants to sponsor support for an official cPanel integration. As in, a company who makes stacks of cash from selling Lucee hosting and is willing to pay for this to be done. We love sponsored projects.
The second way this might change is if one (or more!) Lucee hosting companies become paying Lucee members. This not only funds additional dev, but it gives those companies a direct line to our development team to help influence what is important to LAS. Features that LAS members use are always given a priority.

Now, I suppose there’s a 3rd way. If you can get a giant grassroots movement of users who will all benifit from this feature to amass a huge amount of votes and interest in our bug tracker for a ticket regarding this. Our fearless PM @IamSigmund is always taking what’s most important to the community into considering when planning our sprints. (Using ticket votes in JIRA)

As such, no one has ever sponsored a cPanel plugin, none of the LAS members are hosting providers, and very few people in the Lucee community use or care about cPanel which is why it’s not a feature that’s ever really been considered. I’d say the best way forward is to take what you can get from Jordan and start a community project for cPanel that has the scripts and documentation for people to use and contribute back to.

1 Like

Thanks for the answer. Does that mean most Lucee users are managing Linux servers by command lines, rather a GUI?

I have alway thought the main benefit of Coldfusion was its relatively easy to pick up, but if current users of Lucee are all Linux savvy techy’s that kinda limits its appeal and as you point out its unlikely to ever get lots of votes in JIRA.

I was thinking that CFML is better alternative to PHP and with a open source CFML, its popularity would grow and more hosting companies would be prepared to offer Lucee as a dedicated servers option, but without a control panel (which also handles the security updates etc), I cannot see that happening. Which is a shame as from what I have seen so far Lucee looks in to be better and better supported than Coldfusion.

1 Like

I can’t answer for anyone else, but my personal sites run Lucee on a VPS and I never touch those annoying control panel things that hosting companies have. I prefer to just manage Apache/Nginx and Lucee directly via the CLI. That said, I don’t manage any huge number of servers, so it’s not that big of a deal.

Generally speaking, I see the entire world of server orchestration moving away from GUIs and towards CLIs, or at least a complete CLI with an optional GUI on top. See Docker for instance. I agree with you that it would be great to see hosting companies pick up Lucee but it’s a chicken and egg issue where there’s not much demand at all yet for the features that would be most likely to make companies pick it up. I’ve spoken with hosts not too long ago that were using Adobe ColdFusion 7 still because it was the last version supported on their internal control panel.

I don’t personally direct people at shared hosts any longer, and not even VPSs to be honest. I can stick a CF site up on Heroku with a couple commands using the Ortus CommandBox based buildpack and I don’t need any infrastructure to manage the server because it’s a containerized format. That’s where I see the world moving to be honest. That’s why at Ortus, we’ve poured a ton of work into our Lucee/Adobe docker images. With those, our customers can deploy to any host in the world that supports Docker. The app server just becomes an implementation detail of the image. I think your typical server installs (with a control panel) and sunsetting in favor of this. I can script out an entire (Dockerized) server with a few JSON files, some YAML and a handful of environment variables and store them all in source control with a Bitbucket pipeline to automate it. That’s my take anyway :slight_smile:

What Brad said. Why would I go to a hosting provider when I can spin up a docker droplet on https://www.digitalocean.com/ or on Amazon’s https://amazonlightsail.com/ and just deploy my stuff.

The world is going to scripted hosting and pipelines.

2 Likes