Fix some bugs like nginx doesn't startup automatically