Access to host manager in Lucee 5

How do I access the Host Manager in Lucee 5? http://localhost/host-manager
(or /host-manager/html) both return 404.

I think I have a broken context and want to avoid restarting the instance,
and the mod_cfml docs suggest this is a GUI to do that ?

TOm

Looks like Lucee don’t ship it ? Could I do something like copy the
host-manager and manager webapp folders from the source distribution to
somewhere ?

Correct. Lucee doesn’t ship with the Host Manager as the majority of folks don’t use it. However, you CAN copy it in to the webapps folder, re-enable JSP in the web config, and run it.

Would make for a great how-to article, honestly.–
Kind regards,
Jordan Michaels
Vivio Technologies

----- Original Message -----
From: “Tom Chiverton” <@Tom_Chiverton>
To: “Lucee” lucee@googlegroups.com
Sent: Wednesday, October 12, 2016 4:15:42 AM
Subject: [Lucee] Re: Access to host manager in Lucee 5

Looks like Lucee don’t ship it ? Could I do something like copy the
host-manager and manager webapp folders from the source distribution to
somewhere ?

–
Get 10% off of the regular price for this years CFCamp in Munich, Germany (Oct. 20th & 21st) with the Lucee discount code Lucee@cfcamp. 189€ instead of 210€. Visit CFCamp 2016

You received this message because you are subscribed to the Google Groups “Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/cfc94df3-3136-4d67-8d61-a966aa344b02%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

e-enable JSP in the web config,

That would require bouncing Lucee I think ?On 12 October 2016 at 19:24, Jordan Michaels <@Jordan_Michaels> wrote:

–
Tom

If you need to use the additional tomcat components you might want to add
lucee war package to standard tomcat and configure it as default.
This could be as simple as renaming the Tomcat ROOT folder to ROOTOLD,
changing the Lucee war file name to ROOT and dropping it in.

@Jordan,
this question does pop up occasionally so a little how to would be cool ;o)

Best,
BilalOn Wednesday, October 12, 2016 at 6:59:12 AM UTC-4, Tom Chiverton wrote:

How do I access the Host Manager in Lucee 5? http://localhost/host-manager
(or /host-manager/html) both return 404.

I think I have a broken context and want to avoid restarting the instance,
and the mod_cfml docs suggest this is a GUI to do that ?

TOm

OK Guys.

I know this is an old post, but I have managed to set up Apache Tomcat Host Manager on:

Environment:

  • Windows 2012R2
  • Lucee 5.3.6.61
  • IIS 8.5

This technique uses a standard Lucee Windows Installer, with Apache Tomcat already integrated within Lucee.
I know there are already solutions, that use a standalone version of Lucee.
So, I wanted to try and find a solution, for what I suspect, is the most typical kind of Lucee installation?

Add Directories:

The problem with the standard Lucee Windows Installer, is that the UI parts of the manager & host-manager modules, are not included within Tomcat.
I therefore needed to copy over the manager & host-manager folders, from a downloaded copy of:

apache-tomcat-9.0.35-windows-x64\apache-tomcat-9.0.35\webapps

From:

https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/

Into:

C:\lucee\tomcat\webapps

Update Config:

Then I edited:

C:\lucee\tomcat\conf\tomcat-users.xml

With:

<?xml version="1.0" encoding="UTF-8"?>
<tomcat-users xmlns="http://tomcat.apache.org/xml"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
              version="1.0">
	<role rolename="admin-gui"/>
	<role rolename="manager-gui"/>
	<user username="[create a username here]" password="[create a password here]" roles="admin-gui,manager-gui"/>
</tomcat-users>

Then I removed the comments around the JSP references inside:

C:\lucee\tomcat\conf\web.xml

Line 268:

<servlet>
        <servlet-name>jsp</servlet-name>
        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
        <init-param>
            <param-name>fork</param-name>
            <param-value>false</param-value>
        </init-param>
        <init-param>
            <param-name>xpoweredBy</param-name>
            <param-value>false</param-value>
        </init-param>
        <load-on-startup>3</load-on-startup>
</servlet>

Line 511:

<servlet-mapping>
        <servlet-name>jsp</servlet-name>
        <url-pattern>*.jsp</url-pattern>
        <url-pattern>*.jspx</url-pattern>
</servlet-mapping>

Line 4834:

<welcome-file-list>
		<welcome-file>index.cfm</welcome-file>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
</welcome-file-list>

And then I uncomented the section:

<Connector executor="tomcatThreadPool"
               port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />

In:

C:\lucee\tomcat\conf\server.xml

Restart Lucee Apache Tomcat:

And then I restarted the Lucee Apache Tomcat Server.

Apache Tomcat Host Manager:

Then navigate to:

http://localhost:8080/host-manager/

Now, there is one more important point.
In Apache Tomcat Host Manager:

You cannot add aliases to existing host entries

However, if you remove the host entry and then add the host entry again, with your aliases, it does the same thing.
I also unchecked all the associated checkboxes with the new host entry, but I am not entirely sure whether this is correct.
I just didn’t want to redeploy anything?
Maybe someone with more knowledge about Apache Tomcat Host Manager, could tell me whether this approach is correct or not?

Remember to add your new binding in IIS, first.

And the beauty is, this process does not require a Lucee Apache Tomcat restart.

Update DNS Record:

Having added a new IIS binding & Apache Tomcat Host alias, I then went to my 123-reg Domain DNS Control Panel and added the new domain name that matches the new binding/alias.

I then hit the new domain URL, in my browser and voila, everything works!

I can now see my website on a new domain, without having to restart Lucee Apache Tomcat.

Summary:

Now imagine you have a 1000 websites on your Lucee Application Server instance. This system makes things far more manageable.
You certainly don’t want to have to restart 1000 websites, every time you want to add one new alias.

Mod_cfml:

This procedure is good for admins who don’t want to use mod_cfml. Personally, I found that I could never get mod_cfml, to work.
I believe my approach, is a little less nuclear. Yes. It requires a bit more work and a little more config, but it is config that doesn’t seem to interfere with the way Lucee, works.

And Finally:

If you have any questions, please do not hesitate to reply to this comment. :slightly_smiling_face:

3 Likes

Awesome content @Charlesr thank you very much! Great post!!!

1 Like

Hey. No worries, Andreas.
I’ve seen so many posts related to this problem and none of them quite addressed the issue.
I’m quite relieved, I don’t have to disturb my other websites, now! :slightly_smiling_face:

1 Like