Configuring Apache

To enable the traffic routing from Apache to AcuToWeb Gateway, use the following steps:

  1. (Optional) To enable WebSocket compression, edit your gateway configuration file to include the following line:
    "ws_compression"     : 1,
  2. Open the Apache httpd.conf file.
  3. Enable the proxy module by uncommenting the following line:
    LoadModule proxy_module "{APACHEPATH}/modules/mod_proxy.so"
  4. Append the following to the end of the file:
    # HTTP
    <VirtualHost *:80>
         ProxyPreserveHost On
         ProxyPass / http://{ip-gateway}:{webserver_port of gateway.conf}/
         ProxyPassReverse / http://{ip-gateway}:{webserver_port of gateway.conf}/
    </VirtualHost>
    # WebSocket
    <VirtualHost *:{The port used by the client to communicate to the gateway}>
    	ProxyPreserveHost On
    	ProxyPass / ws://{ip-gateway}:{tcp_port of gateway.conf}/
    	ProxyPassReverse / ws://{ip-gateway}:{tcp_port of gateway.conf}/
    </VirtualHost>
  5. Consult the following scenarios, and use the appropriate one to help you replace the place-holder text in the sections that you have just added, with real information.