fixed bug in nginx config.
added init script for system service.