Apache HTTP Server
To configure Apache HTTP Server as reverse proxy in front of the Axon Ivy Engine, configure it as follows:
All HTTP traffic between client and reverse proxy is redirected to HTTPS
Only the necessary applications (here: demo-portal) is available via the reverse proxy
Apache HTTP Server 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
# needed to terminat SSL on Apache
RequestHeader set X-Forwarded-Proto "https"
# forward websocket requests
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://ivy:8080/$1 [P,L]
# 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>