配置后端 web服务 ---node02 [root@node02 ~]# mkdir /usr/share/nginx/html/static/ [root@node02 ~]# echo static_pools > /usr/share/nginx/html/static/index.html [root@node02 ~]# vim /etc/nginx/conf.d/vhost.conf server { listen 80; server_name static.wan.com; location / { root ...
网站新上线移动站(m.domain.com),要在nginx代理里配置根据User-Agent自动跳转m站功能,下面是具体配置 server { list80default_server; server_name www.uxuan.ccuxuan.cc; # 重定向到www域名if($host = uxuan.cc) { rewrite^/(.*)$ http://www.uxuan.cc/$1 permanent; # permanent表示永久重定向} # ...