全站https实现某个页面可以http访问,其余全部跳转到https,注意下面的location,如果不加root 配置   找不到这个文件的
server { listen
80; server_name www.test.com; if ($request_uri !~* "/test-site-verification.txt") { rewrite ^(.*)$ https://$host$1 permanent; } location = /test-site-verification.txt { root /data/www/test; } access_log /data/logs/www/test_www_server-301.log; }

 

相关文章:

  • 2021-11-21
  • 2023-01-28
  • 2021-12-22
  • 2021-11-21
猜你喜欢
  • 2022-01-16
  • 2021-11-21
  • 2021-11-21
  • 2021-12-01
相关资源
相似解决方案