Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2841980
  • 博文数量: 348
  • 博客积分: 2907
  • 博客等级: 中校
  • 技术积分: 2272
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-12 09:16
个人简介

专注 K8S研究

文章分类

全部博文(348)

文章存档

2019年(22)

2018年(57)

2016年(2)

2015年(27)

2014年(33)

2013年(190)

2011年(3)

2010年(14)

分类: 系统运维

2018-10-10 22:04:33

如果一站点既要80 http访问,又要443https访问。

要让https和http并存,不能在配置文件中使用ssl on,配置listen 443 ssl;

实例

server
{

listen 80;
listen 443 ssl;
server_name
index index.html index.htm index.php;
root /home/wwwroot/
#ssl on; 这里要注释掉
ssl_certificate /usr/local/nginx/conf/www_iamle_com.crt;
ssl_certificate_key /usr/local/nginx/conf/www_iamle_com.key;

#以下配置省略

}



阅读(1586) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~