Backport improvements from the master branch version of server.cfg