'hostnames' are local, for admin purposes, whereas an FQDN is an internet
address for production URLs. A system may or may not have an internet FQDN, but
will always have a hostname (even if "localhost"), which I kind of expect to be
the default.
it seems simpler to use gethostname(), then determine which port is configured
w/ the corresponding address, rather than try to guess, but I'm sure there are
many factors.
_S.