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.

  1. Login to PAM host server and open the file $PAM_HOME/web/conf/server.xml in a text editor.
  2. Near the end of this file, locate the line:
  3. Copy
    <Host name="localhost"  appBase="webapps"
                unpackWARs="true" autoDeploy="true">

  4. Immediately after that line, add this new line:

    Copy
    <Valve className="org.apache.catalina.valves.rewrite.RewriteValve" />
  5. As a result, it should look like this:

    Copy
    <Host name="localhost"  appBase="webapps"
                unpackWARs="true" autoDeploy="true">

       <Valve className="org.apache.catalina.valves.rewrite.RewriteValve" />
  6. 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“

    Before the two changes, shown in proxyPort secure ="true" scheme="https":

    Copy
    <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":

    Copy
    <Connector port="8080" protocol="HTTP/1.1"

                   connectionTimeout="20000" proxyPort="443" secure="false" scheme="http" SSLEnabled="false"

                   redirectPort="443" />
  7. Save and close the file.

  8. 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/.

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

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