bugfix ngnix, and add phpunit