How to enable HSTS in Apache (Port 28443)

Disclaimer: Please contact Sophos Professional Services if you require assistance with your specific environment.


The steps are:

  1. Add the below line in the file /opt/pmx6/etc/manager/httpd2.conf

    LoadModule headers_module apache/modules/mod_headers.so
     
  2. Add the below line in the file /opt/pmx6/etc/manager/httpd2/ssl.conf

    Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"

    Note: Parameters like max-age must be configured as per the requirement.
     
  3. Restart the HTTPD service to make the configuration change effective.

    pmx-service restart httpd

Example files are attached.

/cfs-file/__key/communityserver-discussions-components-files/303/ssl-and-httpd2.zip