Skip to content

Fortified IDDocs

2. Add certificate and enable https

Add a SSL certificate to your Apache Web server reverse proxy.

Configure HTTPS for the connection from clients to Apache. Step 3 configures the separate connection from Apache to each Fortified ID backend.

Complete Install on Windows and verify that the Apache service responds locally. Confirm that the hostname clients will use resolves to the reverse proxy from their network.

Create a certificate to use for https communication

Section titled “Create a certificate to use for https communication”

Obtain a PEM server certificate that covers the proxy hostname and is trusted by the intended clients. Store the private key where the Apache service account can read it and restrict access to authorized accounts.

The examples use proxy.example.com and files in C:\Apache24\conf\extra\certificates. Substitute your own hostname and certificate paths.

You enable httpd-ssl configuration by including the configuration file in httpd.conf file. That file will include configuration for https (443).

  1. Open file httpd.conf C:\Apache24\conf

  2. Locate following lines and remove comment for httpd-ssl.conf.
    Correct configuration should look like follows:

    # Secure (SSL/TLS) connections
    Include conf/extra/httpd-ssl.conf
  3. Save file httpd.conf

Open C:\Apache24\conf\extra\httpd-ssl.conf. In the HTTPS virtual host, set SSLCertificateFile to your server certificate PEM, including any required intermediates in leaf-first order. Set SSLCertificateKeyFile to the matching private key and ServerName to the hostname clients use. Save the file.

ServerName proxy.example.com:443
SSLCertificateFile "C:\Apache24\conf\extra\certificates\proxy.example.com-crt.pem"
SSLCertificateKeyFile "C:\Apache24\conf\extra\certificates\proxy.example.com-key.pem"

See the Apache certificate directive reference for the PEM chain format.

Enable TLS and HTTP reverse proxy support for the example. The shared-memory cache module supports the TLS session cache in the example configuration.

  1. Open the file httpd.conf (located in /conf/ folder)
  2. Find and enable following modules. You enable by removing the # character.
    1. LoadModule proxy_module modules/mod_proxy.so
    2. LoadModule proxy_http_module modules/mod_proxy_http.so
    3. LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
    4. LoadModule ssl_module modules/mod_ssl.so
  3. Save httpd.conf
  1. Open the file httpd-ssl.conf (located in /conf/extra/ folder)

  2. Locate Listen 443

  3. Remove # in front of listen, result should look like:
    Listen 443

  4. Save httpd-ssl.conf

  5. From C:\Apache24\bin, run the Windows service configuration test in PowerShell. Use your installed service name if it differs.

    Terminal window
    .\httpd.exe -n "Apache HTTP Server" -t
  6. After Syntax OK, start or restart the Apache service.

  1. Open a browser
  2. Open your reverse proxy URL, for example https://proxy.example.com/. Replace proxy.example.com with the hostname on your certificate.
  3. Confirm that the browser accepts the certificate and shows the Apache landing page in the example setup. If the connection fails, check DNS, the listener on port 443, the firewall, and the Apache error log.

Check that port 80 is free of dependencies such as redirects, certificate validation, and other sites before disabling its listener.

  1. Open the file httpd.conf (located in /conf/ folder)
  2. Locate Listen 80
  3. Put a # in front of listen, result should look like:
    #Listen 80
  4. Save httpd.conf
  5. Run the service configuration test again, then restart Apache if it reports Syntax OK. Verify that HTTPS still responds and that port 80 is no longer served by this instance.

After HTTPS works at the proxy hostname, continue with Configure the Fortified ID virtual host.