refactoring so nginx configured on load