To configure SSL for XRay, follow the procedure below:
- Stop Apache Tomcat.
- Update the [AUTOPILOT_HOME]/apache-tomcat/conf/server.xml file as follows:
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
keystoreFile="/opt/nastel/AutoPilotM6/keystore.jks" keystorePass="PASSWORD"
clientAuth="false" sslProtocol="TLS" sslEnabledProtocols="TLSv1.2,TLSv1.1,TLSv1"/>
Note that in the sample above, keystore.jks keystoreFile is an example only. Use your own keystoreFile and password.
Modify line 3 accordingly:keystoreFile="/opt/nastel/AutoPilotM6/keystore.jks" keystorePass="PASSWORD"
- Update the [AUTOPILOT_HOME]/apache-tomcat/conf/web.xml file as follows:
<security-constraint>
<web-resource-collection>
<web-resource-name>Automatic Forward to HTTPS/SSL
</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
- Start the Tomcat server. To test that configuration has been set up properly, try running the application with “HTTPS”.