0

I have a renderer setup that is basic. I am however, find it difficult to find any documentation on this.

How do I get Open Search Server to use HTTPS as opposed to HTTP for all it's connections and workings?

This has got me stumped, I can see it is using apache and tomcat in the backend, but I do not see any of the conf files I would expect.

I have been through all of the docs listed here: http://www.opensearchserver.com/documentation/README.md

So any help would be appreciated.

Thanks

OSS Newbie!

RR_SH
  • 58
  • 9

1 Answers1

1

The basic setup for a java web application like OSS on a Windows server is to:

  1. Setup java application container (Tomcat) to run as a Windows service. You can use NSSM (Non-sucking service manager) or download the Tomcat windows service installer. This will allow you to access the java web application locally using a port like 8080, 9090 or whatever is configured.
  2. If you want to access OSS externally from the server (ie: from standard port 80 web request), you must setup reverse proxy such that IIS can forward any port 80 requests to the OSS application running on port 9090, for example.

For step #2, you need to do the following steps:

  1. Install IIS Rewrite Extension (http://www.iis.net/downloads/microsoft/url-rewrite)
  2. Install Application Request Routing (http://www.iis.net/downloads/microsoft/application-request-routing)
  3. Click on IIS Server node, click Application Request Routing Cache icon under IIS
  4. Select Server Proxy Settings, Enable Proxy with default settings
  5. Create new web application and point to empty folder
  6. Create a web.config file in the folder
  7. Add the following into the web.config (make sure port number is same as Tomcat service configuration).

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
 <system.webServer>
  <rewrite>
   <rules>
    <rule name="ReverseProxyInboundRule1" stopProcessing="true">
     <match url="(.*)" />
     <action type="Rewrite" url="http://localhost:8080/{R:1}" />
    </rule>
   </rules>
  </rewrite>
 </system.webServer>
</configuration>

Once you have a working IIS application that is forwarding all requests to OSS, you can then install an SSL certificate and add a binding to the IIS application for https using the certificate you installed.

Fix It Scotty
  • 2,852
  • 11
  • 12
  • Hi @DotNetNuclear, Thanks for the information. This for the most part worked, with the exception of the reverse proxy with the URL rewrite. This did not work with an effect of the page no longer being available. I am not sure if this is because the renderer was not working as it should have done. I will have a little more time today to work with it. So will let you know probably at the end of today. – RR_SH Mar 13 '17 at 09:24
  • Okay not getting further with the reverse proxy. What am I doing wrong here? As it doesnt look obvious. When I look at the log it looks like IIS is swallowing a '?' when forwarding the request to the server based on the entry in the log file 2017-03-15 10:13:25 172.20.0.101 GET /renderer use=Documentation&login=view&key=cef777f6dca67891b076ebabe2b305cf&name=default-file 80 - 172.20.0.101 Mozilla/5.0+(Windows+NT+6.3;+WOW64;+Trident/7.0;+rv:11.0)+like+Gecko - 404 0 2 0 – RR_SH Mar 15 '17 at 10:20
  • RR_SH, I mainly use the OSS API to get search results so I haven't experienced this issue. Based on what you described, you may try changing the action element in the web.config by adding appendQueryString="true". So it should look like this: – Fix It Scotty Mar 15 '17 at 13:26
  • Looks like it took me a while to work out. Your answer plus this amazing post helped me: http://ruslany.net/2009/04/10-url-rewriting-tips-and-tricks/ (No. 7) Which is exactly what you said. But I must have gotten confused along the way. Now to make sure the render page is the first page people see. – RR_SH Mar 16 '17 at 16:41