Products | Versions |
---|---|
Spotfire Server | 7.5, 7.6, 7.8 and higher |
The rewrite module in Tomcat 8 can be used to redirect all clients requesting http://spotfireserver/ to https://spotfireserver/.
Note: This does not work on Spotfire Server 7.7.0 (which uses Tomcat 8.0.37), but works on earlier and later releases (7.6 uses Tomcat 8.0.33, 7.8 uses Tomcat 8.0.39).You need to have configured HTTPS before starting. See Configuring HTTPS. This article assumes you are using the default ports 80 (HTTP) and 443 (HTTPS). If you are using other port numbers, you need to adjust the values in the examples below.
Both HTTP and HTTPS connectors should be enabled in <installation dir>/tomcat/conf/server.xml
:
<Connector port="80" maxHttpHeaderSize="16384" connectionTimeout="30000" enableLookups="false" URIEncoding="UTF-8" disableUploadTimeout="true" server="TIBCO Spotfire Server" compression="on" ... /> <Connector port="443" maxHttpHeaderSize="16384" connectionTimeout="30000" enableLookups="false" URIEncoding="UTF-8" disableUploadTimeout="true" server="TIBCO Spotfire Server" ... sslProtocol="TLS" sslEnabledProtocols="TLSv1.2,TLSv1.1,TLSv1" useServerCipherSuitesOrder="true" />
In <installation dir>/tomcat/conf/context.xml
add <Valve className="org.apache.catalina.valves.rewrite.RewriteValve" />
before </Context>
.
<Valve className="org.apache.catalina.valves.rewrite.RewriteValve" /> </Context>
Create rewrite.config
and place it in <installation dir>/tomcat/webapps/ROOT/WEB-INF/
.
The content of this file should be:
RewriteCond %{SERVER_PORT} =80 RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,NE,L]
IMPORTANT NOTE:
If you want to redirect http://<tss url>/spotfire:
Restart the Spotfire server so the changes take effect.
Doc: Configuring HTTPS:
Doc: HTTP Strict - Transport - Security (HSTS)