Categories
Knowledge Support Support exacqVision Server Categories Products

How to change web service ports

There are two ways to modify the ports used by the Web Service:

  1. Using the Web Service configuration interface
  2. Hand editing the configuration file

It is recommended to use the configuration interface, whenever possible. However, it is possible that you must hand edit the configuration in cases where the Web Service cannot start (for example, if there is a port conflict). This article provides instructions for both methods.

Important:  The structure and location of the Web Service config has changed over the life of the web service. Please pay close attention to the section headers in this article, as they indicate the versions to which particular instructions apply.

While various versions are mentioned in this article, it is recommend to keep your Web Service updated to the latest version to help prevent exposure to vulnerabilities and take advantage of the latest performance improvements.

<br>

Using the Web Service configuration UI

Versions 9.6 and above

Log into Web Service Configuration using your Web Service administrator account. Using the provided Web Service configuration interface navigate to Configuration > Ports.

Update the fields to change to your selected port number, then click ‘Apply’ to save your changes. The Web Service will need to restart to reflect your changes.

Versions 7.6 to 9.4

Web Service version 7.2 introduced Web Sockets for video streaming. Version 9.4 was the last version to feature Web Sockets, as it was replaced by other improvements.

When logging into Web Service Configuration, navigate to Configuration > Ports. Update the fields shown to your selected port numbers then click ‘Apply’ to save your changes. The Web Service will need to restart to reflect your changes.

Versions 7.2 to 7.6

Web Service version 7.2 introduced Web Sockets for video streaming. Version 9.4 was the last version to feature Web Sockets, as it was replaced by other improvements.

When logging into Web Service Configuration, navigate to Basic Service Configuration. You have the ability to update the Web Service Port and WebSocket Ports through the configuration page.

To change the HTTPS (SSL) or Secure WebSocket (SSL) ports requires manually editing the configuration file. See the section in this article titled ‘Manual Configuration‘ for more on these steps.

The Web Service will need to restart to reflect your changes.

Versions 7.0 and earlier

These versions are quite dated and as mentioned earlier, we recommend keeping your Web Services updated to help avoid vulnerabilities and take advantage of new features and performance enhancements.

<br>

Additional SSL Information

Note: Changing the SSL ports (https/wss) DOES NOT enable SSL. This merely allows you to easily modify those ports, but you still need to manually configure SSL support for both Apache and WebSockets. See the following article on configuring a certificate for HTTPS.

Firewall/Router Configuration

Note: Be sure to forward the new port in your router. Exacq Technical Support does not provide assistance with port forwarding, but see the following links if necessary:

<br>

Manual Configuration (hand editing the configuration)

The steps here will change depending on the type of port (HTTP vs. WebSockets) you wish to edit.

HTTP / HTTPS (Web Service verions 7.2 and above)

The first step to manual editing is to find the location of the config file where the port numbers are held. This depends on both the platform (operating system) and version of the Web Service you have installed.

Windows:

  • 9.0.x+ (both HTTP and HTTPS are in the same file):
    C:\ProgramData\Webservice\conf\wfe.json
  • 7.2.x – 8.8.x:
    • HTTP:
      C:\Program Files[(x86)]\exacqVision\WebService\Apache\conf\httpd.conf
    • HTTPS:
      C:\Program Files[(x86)]\exacqVision\WebService\Apache\conf\extra\httpd-ssl.conf

Linux:

  • 9.0.x+ (both HTTP and HTTPS are in the same file):
    /etc/webservice/wfe.json
  • 7.2.x – 8.8.x:
    • HTTP: /etc/evapache/httpd.conf
    • HTTPS: /etc/evapache/extra/httpd-ssl.conf

Determine where this file is for your install before continuing.

Once you have found the file, open it using your editor of choice (be sure to do so with administrative privileges) and perform either of the following depending on its name:

  • For httpd.conf (HTTP port) and httpd-ssl.conf (HTTPS port):
    1. Find the Listen directive in the file
      • For example, if the current port is 80, the line should read Listen 80
    2. Modify the port number as desired
    3. Save the file and restart Apache and the Web Service
  • For wfe.json:
    1. Find the webserver section
    2. For the HTTP port:
      • Find the listen key, nested one level within the webserver section
      • Modify the port number as desired
    3. For the HTTPS port:
      • Find the tls key, nested one level within the webserver section
      • Under the tls section, find the listen key one level below
      • Modify the port number as desired
    4. Save the file and restart the web service

<br>

Web Sockets (7.2.x – 9.4.x)

Both the standard and SSL WebSocket ports are changed from the Web Service ini/conf file. The location and name of this file depends on the platform (operating system) and web service version:

Windows:

  • 7.2.x – 9.4.x: C:\Program Files[(x86)]\exacqVision\WebService\WebService.ini

Linux:

  • 7.2.x – 8.8.x: /etc/webservice.conf
  • 9.0.x – 9.4.x: /etc/webservice/webservice.conf

Determine where this file is for your install before continuing.

Once you have found the file, open it using your editor of choice (be sure to do so with administrative privileges) and perform the following:

  1. Find the [Broker] section.
    This will only appear if it was entered manually before, or you configured it previously using the UI. So if you do not see it, and are configuring it for the first time, you may need to enter it by hand.
  2. The standard websocket port configuration is websocket_port = 8082, while the secure websocket port (wss) is ssl_port = 8083. Modify the port numbers as desired.
  3. As mentioned above, if these configuration settings are not already present, or the [Broker] section is missing, the defaults are being used. You may manually add the section/settings with desired values should this be the case. The resulting section of the file should appear similar to the below example, with your custom port numbers.
    [Broker]
    websocket_port = 8082
    ssl_port = 8083
  4. Save the file and restart the web service.

<br>