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:

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

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>.