Some environments use port 80/443 for web traffic exclusively, with port 80 being a 301/302 redirect to the HTTPS port 443.
Such a scenario prevents the visitor from also connecting to the Aphlict notification server, which listens on a different port or address. This may work fine for distributed Phabricator clusters, but for a stand-alone environment creates the following scenario:
- notification.client-uri needs to be set to an address that visitors' browsers can reach, such as https://git.kolab.org/ws/. This would be an Apache httpd mod_proxy_wstunnel websocket proxy to http://localhost:22280/.
- notification.server-uri is set to an internal IP address in private IP space, or http://localhost:22281/ as is the case.
As a result, Aphlict is started with an undetermined port to listen on for client connections, with the literal string --client-port=.
The default spells the default for config['client-port'] = 22280, but the default does not kick in for the following command-line:
$ support/aphlict/server/aphlict_server.js --client-port= --admin-port=22281 --admin-host=localhost --log=/var/log/phabricator/aphlict.log
The proposal is to test if (matches) before issuing config[matches] = matches.