How to switch UI to port 443

You can skip this procedure if you are running the XorMon Virtual Appliance, which uses port 443 by default.

This is necessary if you want to use port 443 or any other port lower than 1024 for application running under non-privileged user (xormon).
By default XorMon application is running on port 8443 but 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 "
    ss -an| grep LISTEN |grep ":443 " # on newer systems where netstat is not available 
Allow the application to use low port number (as root)

    Note: you have to re-run this command after each Node.js upgrade
    /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
    SLES / openSUSE

    Some Linux distributions set command alternatives for multiple verions.
    In this case, set the port binding capability for the default alternative as well.

    • 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)
    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 (as root)

    RedHat Linux
    firewall-cmd --zone=public --add-port=443/tcp --permanent
    firewall-cmd --reload
    firewall-cmd --list-port 

    Debian Linux
    ufw allow 443/tcp
    ufw reload
    ufw status verbose

Dernière mise à jour :