I pointed the two domain names to the same folder before
Now I want to point www.test2.com to another folder
But after the change, domain names such as www.test2.com and xy.test2.com cannot be accessed ,
can be replaced with other domain names such as www.test3.com.
I really can’t find the reason, please ask God for an answer
When you pointed to another directory, did you remove test2.com from server_name in the original server?
Configuration problems can be tested through nginx -t, and the problems in the test file will be displayed.
In addition, if there is a problem with the configuration file, a response error should be printed when starting, please check it carefully.
That means the changes do not take effect. Clear the nginx cache, usually in var/cache/nginx. Or turn off sendfile in the configuration, especially when running on virtualbox. Reference from http://stackoverflow.com/questions/6236078/how-to-clear-the-cache-of-nginx