add func: sever_port_for_client
use var ServerAddr in nginx.conf for server_name and request header host instead
'localhost'