Apache httpd

This is how the configuration for Apache httpd as reverse proxy in front of Axon Ivy Engine can look like:

  • All HTTP traffic is redirected to HTTPS

  • Only the application demo-portal is available over the reverse proxy

  • Apache httpd communicates over HTTP with the Axon Ivy Engine

<VirtualHost *:80>
  # reverse proxy server name
  ServerName localhost

  # redirect http traffic to https
  Redirect permanent / https://localhost/
</VirtualHost>

<VirtualHost *:443>
  # reverse proxy server name
  ServerName localhost

  # ssl
  SSLEngine On
  SSLCertificateFile /certs/server.crt
  SSLCertificateKeyFile /certs/server.key

  # prevents that this proxy can be misused as forward proxy
  ProxyRequests Off

  # keep host header
  ProxyPreserveHost On
  RequestHeader set X-Forwarded-Proto "https"
  RequestHeader set X-Forwarded-Port "443"

  # target server
  ProxyPass /demo-portal http://localhost:8080/demo-portal

  # rewrite locations headers in the response to the right place
  # should not be needed for ivy in general
  ProxyPassReverse /demo-portal http://localhost:8080/demo-portal

  # redirect to the ivy application
  RedirectMatch 302 ^/$ /demo-portal
</VirtualHost>