WIP: move back configuration to main module and set real server if localtion hostname is not localhost