Refactor nginx config and fix duplicated default