refactored core and nginx_config, fix for client center http rewrite