Unable to access after changing server_name in nginx?
给我你的怀抱
给我你的怀抱 2017-05-16 17:19:57
0
2
517

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

给我你的怀抱
给我你的怀抱

reply all(2)
为情所困

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.

Ty80

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!