Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/three.js/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Redirect NGINX+;301返回我的CDN_Redirect_Ssl_Nginx_Return_Http Status Code 301 - Fatal编程技术网

Redirect NGINX+;301返回我的CDN

Redirect NGINX+;301返回我的CDN,redirect,ssl,nginx,return,http-status-code-301,Redirect,Ssl,Nginx,Return,Http Status Code 301,我的服务器上正在运行重定向,因此我的所有流量都重定向到https,如下所示: server { listen 80; server_name example.com www.example.com; return 301 https://$server_name$request_uri; } 这很好,但是现在我使用的是CDN,我的CDN默认为HTTPS,我希望我的CDN.example.com强制使用ht

我的服务器上正在运行重定向,因此我的所有流量都重定向到https,如下所示:

    server {
       listen         80;
       server_name    example.com  www.example.com;
       return         301 https://$server_name$request_uri;
}
这很好,但是现在我使用的是CDN,我的CDN默认为HTTPS,我希望我的CDN.example.com强制使用http而不是HTTPS,这可能吗?当它强制使用https时,因为我没有有效的ssl证书,所以它不会在大多数浏览器上加载

我的dns是:

example.com A 192.168.1.1
www.example.com CNAME example.com
cdn.example.com CNAME example.cdnexample.com (external host, amazonwebservices)