Refactor webserver configuration