看了非常多Nginx的配置,好像都忽略了ip直接訪问Web的问题.这样理论上不利于SEO优化,所以我们希望能够避免直接用IP訪问站点.而是域名訪问.详细怎么做呢.看以下. 官方文档中提供的方法: If you do not want to process requests with undefined "Host" header lines, you may define a default server that just drops the requests: server { l
他看上去非常Nginx构造,似乎忽略了ip直接访问Web问题,从理论上讲,这是不利于SEO优化,因此,我们希望能够避免直接使用IP访问该网站,但域名.详细介绍了如何做到这一点,看看下面的. 在官方文件中提供的方法: If you do not want to process requests with undefined "Host" header lines, you may define a default server that just drops the requests: