Wordpress multisite subsite redirected to main site

Hi guys!

I installed a wordpress multisite on my lamp.
But, when I added a new subsite, the new subsite’s url was redirected to my main site.
And, when I visited the new subsite by its url directly, I got a “database connection error”.

Could you please give me any hint to solve this problem?

It sometimes happens to me also. And then I have forgot to restart Nginx (Apache). Possible?