除一个文件夹外,NGINX将所有内容重定向到https://www.example.com

时间:2016-02-09 00:16:28

标签: nginx whmcs

我正在使用NGINX运行whmcs计费系统,我的whmcs位置在mydomain.com/whmcs /

我想将所有请求重定向到我的网站到HTTPS www除了whmcs文件夹(whmcs有HTTPS重定向)

某些whmcs页面由whmcs本身(知识,公告页面)重定向到HTTP,而在HTTPS中重定向到

我当前的配置

server {
  listen 80;

  location / {  
      return 301 https://www.$server_name$request_uri;
  }

  location /whmcs/ {} 
}

0 个答案:

没有答案
相关问题