https跳转的问题???
本帖最后由 pfdiy 于 2017-8-23 17:58 编辑我使用火狐那个配置文件 用 hsts 自动从http转向https了,然后使用了 301 将不带www和带www的网址都转想到https://www.我爱hostloc.dalao上,但是问题来了 https://我爱hostloc.dalao,不会301到https://www上。我找了好多教程都不行。。。只能再次求助了!!!!楼下的几个 我也试了 不行啊!!! server
{
listen 443 ssl;
#listen [::]:80;
server_name www.baidu.com;
ssl on;
ssl_certificate /usr/local/ssl/1_www.baidu.com_cert.crt;
ssl_certificate_key /usr/local/ssl/2_www.baidu.com.key;
ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !RC4";
keepalive_timeout 70;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
index index.html index.htm index.php default.html default.htm default.php;
root/home/wwwroot/www.baidu.com;
include wordpress.conf;
#error_page 404 /404.html;
include enable-php.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /\.
{
deny all;
}
access_log off;
}
server
{
listen 80;
server_namewww.baidu.com;
return 301 https://www.baidu.com$request_uri;
}
server
{
listen 80;
server_namebaidu.com;
return 301 https://www.baidu.com$request_uri;
}
server
{
listen 443 ssl;
server_namebaidu.com;
ssl on;
ssl_certificate /usr/local/ssl/1_www.baidu.com_cert.crt;
ssl_certificate_key /usr/local/ssl/2_www.baidu.com.key;
ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !RC4";
keepalive_timeout 70;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
return 301 https://www.baidu.com$request_uri;
} 运动 这个我也不会。。。 等大佬 server_namea.com www.a.com
懂了没 有吗 xu81709752 发表于 2017-8-22 23:14
server_namea.com www.a.com
懂了没
我绑了!不行 Dami 发表于 2017-8-22 23:06
好多!不会出现死循环吗?