Forwarding 2 Knime Servers with the same context path

Hello
we currently use httpd (apache) webserver on 2 different servers.
Forwarding a knime-server url (2) was not a problem, but in future there will be only on server with httpd (apache) installed. The context path of both knime-servers are the same. What is the recommended way to configure httpd (apache) ?

Greetings B.Kochs

Hello,
Let me summarize what I think I understood:
You are running two KNIME Servers in parallel, currently each being routed through a separate Apache httpd server. Now you would like to get rid of one httpd and route traffic to both KNIME Servers through one httpd instance. Is that correct?
If yes, you will need to determine how the httpd should distinguish requests between the two servers. One way is host-based routing (see here). This would mean you configure your DNS to have server1.myhost.com and server2.myhost.com to both point to the httpd instance. In the instance, you configure two VirtualHosts, one with the server name server1.myhost.com and one with the server name server2.myhost.com. In each you set up the forwarding using mod_proxy_balancer with the corresponding KNIME Server as BalancerMember.
Kind regards,
Alexander

1 Like

Hello
each of the 2 Knime-Servers has it’s own Apache Webserver.
One if for testing and the other is the production server.
There is no Loadbalancing required, because both knime-servers serve
a different purpose.
But the context path knime_cloud would by the same.
https://testing.domain.de/knime_cloud/
https://production.domain.de/knime_cloud/
Currently one Apache Webserver is hosted on testing.domain.de the other on production.domain.de.
Now there is a new Apache-server new.domain.de which should forward both knime-servers.
Because of the same context path : knime_cloud I could either

  1. Change the context path of one of the knime-servers , so forwarding by the new server new.domain.de would by easy. There’s allready a thread in this forum how to change the context path of a knime server.
  2. Configure a url-rewrite in the new Apache-server new.domain.de.

In 1) I fear the knime-server does not start up , when configuring like mentioned here:

In 2) I think this would be rather complicated, maybe the rewrite-url does not work properly, but at least the Knime-Server config would not have to be changed.
Which solution would you recommend?
Greetings B.Kochs

Hi,
Ah, so you were talking about an Apache Tomcat server hosting KNIME Server testing.domain.de and another one KNIME Server production.domain.de, and now you want one Tomcat hosting both server instances separately? Or do you want to keep the two Tomcats and have an additional server routing the traffic to them? What do you mean when you refer to “forwarding”? I have never tried it, but hosting two KNIME Server instances in one Apache Tomcat probably does not work.
Kind regards,
Alexander

Hello
perhabs I am using the wrong term: forwarding
more likely to be titled:redirecting

which is done in the following file
(this configuration work, but of course not with both knime-servers)

/etc/httpd/conf.d/knime.conf ___________________________________________
ProxyPreserveHost On

ProxyPass “/knime_cloud” “http://10.20.30.40:8080/knime_cloud”
ProxyPassReverse “/knime_cloud” “http://10.20.30.40:8080/knime_cloud”


‘but hosting two KNIME Server instances in one Apache Tomcat probably does not work.’ → No this does not work, by just renaming the context_path in this config-file:knime.conf
Greetings B.Kochs

Hi,
Okay, I understand. Did you check this link from by first reply? You would set up httpd to listen to requests and if they have the host header testing.domain.de they go to one server and if they have prod.domain.de they go to another one.
Kind regards,
Alexander

1 Like

Hello
’ Unterstützung namensbasierter virtueller Hosts’ leads to using 2 different domain names. We intend to have one hostname. So the context url should be differend , and I wrote a script which ‘renamed’ the context url .
After that I renamed the KNIME_EXECUTOR_PROFILES in 3 Files, altered the settings of the apache httpd on our old solaris server and was able to connect and execute tasks in webportal und knime analytic platform.
The context urls of testing and prod now are different and the new Apache httpd can distinguish between them.
The renamed context url of the prod server via Apache httpd on solaris works now, for now the case is close. Thanks
Greetings B.Kochs

Hi,
Thank you for the update! When you open the WebPortal of the server, does it correctly resolve the CSS and Javascript files in this setup? I’d have thought that this would be a problem.
Kind regards,
Alexander