apachetomcatopen-search-server

How do I get Open Search Server to use SSL & HTTPS?


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!


Solution

  • 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.