点击登录
  • 欢迎访问无限星辰技术博客,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站 QQ群
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏无限星辰吧
  • 好集导航开张了,传送门:好集导航

wdcp 配置https 站点

LINUX服务器 crx349 12446次浏览 0个评论 扫描二维码

模式:
Nginx
修改网站配置文件:

1
listen       80;

下面添加

1
2
3
4
        listen 443 ssl;
        server_name www.xmspace.net;
        ssl_certificate /www/ssl/pem.pem;
        ssl_certificate_key /www/ssl/key.key;

重启nginx服务

https配置成功

301跳转

1
2
3
4
5
6
7
8
9
10
11
#下面两个一样的效果 
if ($scheme = http ) { 
return 301 https://$host$request_uri; 
} 
 
if ($server_port = 80 ) { 
return 301 https://$host$request_uri; 
} 
 
#http://nginx.org/en/docs/http/ngx_http_ssl_module.html#errors 
error_page 497 https://$host$request_uri;

无限星辰 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明wdcp 配置https 站点!
喜欢 (0)
[]
分享 (0)

您必须 登录 才能发表评论!