How to switch UI to port 443

By default XorMon application is running on port 8443.
Ignore this in case of XorMon Virtual Appliance which is running on 443 by default.

It can be configured to use any other port, e.g. 443 (HTTPS).

  • Make sure the selected port is free

    Following command should not provide any output, if it does, then the port is being used by some other application.
    netstat -an| grep LISTEN |grep ":443 "
    Note: netstat is gradually being phased out in some Linux distributions.
    You can use 'ss' command instead:
    ss -ltn | grep -w 443
  • Allow the application to use low port number (as root)
    This is necessary if you want to use port 443 or any other port lower than 1024 for application running under ordinary user (xormon).
    Note: you have to re-run this command after each Node.js upgrade
    Run it under root:
    /usr/sbin/setcap 'cap_net_bind_service=+ep' $(readlink -f $(which node))
    
    # Verify it
    /usr/sbin/getcap `which node`
      # Output should be:
      /usr/bin/node cap_net_bind_service=ep
    Some Linux distributions set command alternatives for multiple verions.
    In this case, set the port binding capability for the default alternative as well.

    SLES / openSUSE
    • check for alternatives
      update-alternatives --get-selections | grep node
        node-default                   auto     /usr/bin/node24
    • set port binding capability
      /usr/sbin/setcap 'cap_net_bind_service=+ep' /usr/bin/node
      /usr/sbin/setcap 'cap_net_bind_service=+ep' /usr/bin/node24
  • Configure application port 443 (as xormon user)
    su - xormon
    vi ~/xormon-ng/server-nest/.env
    APP_PORT=443
  • Restart XorMon (as xormon)
    cd ~/xormon-ng
    
    # Stop XorMon
    ./xormon.sh stop
    
    # PM2 kill to refresh it
    cd server-nest
    npx pm2 kill
    cd ../
    
    # start XorMon
    ./xormon.sh start
    ./xormon.sh status 
    Ignore message "PM2 fail to start" at the end of the start procedure if apears.

  • Add 443 port to the local firewall configuration if its is active (under root).
    RedHat:
    firewall-cmd --zone=public --add-port=443/tcp --permanent
    firewall-cmd --reload
    firewall-cmd --list-port 
    Debian:
    ufw allow 443/tcp
    ufw reload
    ufw status verbose