Configure HTTP to HTTPS Redirect
To Configure HTTP (8080) to HTTPS (443/6443) Redirection
If you want to redirect HTTP 8080 to HTTP 443/6443 then follow the steps provided below.
- Login to PAM host server and open the file $PAM_HOME/web/conf/server.xml in a text editor.
- Near the end of this file, locate the line:
-
Immediately after that line, add this new line:
Copy<Valve className="org.apache.catalina.valves.rewrite.RewriteValve" />
- Next, in this same server.xml file, locate the connector section for port 8080. In this section, make these two changes:
- from: secure=”true” to: secure=”false“
- from: scheme=”https” to: scheme=”http“
-
Save and close the file.
-
Next, download this new rewrite.config file (https://help.xtontech.com/ref/rewrite.config) and place it in the directory$PAM_HOME/web/conf/catalina/localhost/.
-
If you are using HTTPS 443, then you do not need to make any changes to this new rewrite.config file. If you are using an HTTPS port other than 443, like 6443, then open this file in a text editor and change 443 to your HTTPS port number. Save and close the file when done.
-
Finally, restart the PamManagement (Windows) or pammanager (Linux) service to complete the process. When the service comes back online, any connection made to 8080 will be redirected to 443 or another port defined earlier.
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
As a result, it should look like this:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<Valve className="org.apache.catalina.valves.rewrite.RewriteValve" />
Before the two changes, shown in proxyPort secure ="true" scheme="https":
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000" proxyPort="443" secure="true" scheme="https" SSLEnabled="false"
redirectPort="443" />
After the two changes, shown in proxyPort secure="false" scheme="http":
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000" proxyPort="443" secure="false" scheme="http" SSLEnabled="false"
redirectPort="443" />