Change default 443 port

Sometimes there is a need to change the port to which the agent sends its data.

For this you need to perform two steps:

1. Change the port in the server settings.

sudo nano /etc/nginx/sites-available/ssl.staffcop

We will see output of this kind:

server {
    server_name             _;
    listen                  443;
    ssl                     on;
....

Change the 443 value for the required one, for example - 4443

server {
    server_name             _;
    listen                  4443;
    ssl                     on;
....

the restart nginx.

sudo service staffcop restart; sudo service nginx restart

2. Change the port in the agent settings.

This can be implemented by reinstalling the agent (the version to be installed should be at least equal to the version installed) or by changing the value in the registry.

ADD HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\TimeSvc3\ServiceConfiguration

3. If you want to specify the second port for managing StaffCop Server from outside the local network, your steps will differ.

Make a copy of the configuration file of the main site:

sudo cp /etc/nginx/sites-available/ssl.staffcop /etc/nginx/sites-available/ssl.staffcop2

Change the port value in the file /etc/nginx/sites-available/ssl.staffcop as was shown on the step 1.

sudo nano /etc/nginx/sites-available/ssl.staffcop2

Restart nginxstaffcop services once again:

sudo service staffcop restart; sudo service nginx restart

Now StaffCop Server listens to both 443 and 4443 ports.