Fix syntax in nginx proxy configuration
Validate nginx configuration before reloading

This should prevent bad changes from breaking nginx and allow
corrections to be made before the change is reloaded.