Scenario 3 Apache and Gateway on different servers

In scenario 3, Apache is installed on one server, and the AcuToWeb Gateway is installed on another server.

Using the following details:

tcp-port 8008 (the default)
webserver_port 3000 (the default)
Apache HTTP port 80 (the default)
WebSocket port 8008

Amend the httpd.conf file as follows:

# HTTP
<VirtualHost *:80>
    ProxyPreserveHost On
    ProxyPass / http://{IP Address of the Gateway server}:3000/
    ProxyPassReverse / http://{IP Address of the Gateway server}:3000/
</VirtualHost>
# WebSocket
<VirtualHost *:8008>
    RequestHeader set Host "{IP Address of the Gateway server}:8008"
    ProxyPreserveHost On
    ProxyPass / ws://{IP Address of the Gateway server}:8008/
    ProxyPassReverse / ws://{IP Address of the Gateway server}:8008/
</VirtualHost>

The URL opened by the browser does not require a portgw parameter; its value defaults to tcp_port.

Important: The firewall on the Apache web server machine must allow connections on ports 80 and 8008, and the firewall on the AcuToWeb Gateway server must allow connections on ports 3000 and 8008. (The Gateway server only allows connections from the local area network.)