Scenario 1 Apache and Gateway on same server; Apache forwards all communications

In the first scenario, the Apache web server and the AcuToWeb Gateway are on the same server, and you want all communications to be forwarded by Apache.

Using the following details:

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

Amend the httpd.conf file as follows:

# HTTP
<VirtualHost *:80>
    ProxyPreserveHost On
    ProxyPass / http://localhost:3000/
    ProxyPassReverse / http://localhost:3000/
</VirtualHost>
# WebSocket
<VirtualHost *:8010>
    RequestHeader set Host "localhost:8009"
    ProxyPreserveHost On
    ProxyPass / ws://localhost:8009/
    ProxyPassReverse / ws://localhost:8009/
</VirtualHost>

When opening the application in a browser, the URL must contain portgw=<port_num> (<port_num> in this instance is set as 8010 but can be any valid port number, except the same number as tcp_port)

Important: The firewall must allow connections on ports 80 and <port_num>.