Nginx一個server主機上80、433http、https共存

如果一站點既要80 http訪問,又要443https訪問。

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

實例

server
{
listen 80;
listen 443 ssl;
server_name www.iamle.com;
index index.html index.htm index.php;
root /home/wwwroot/www.iamle.com/;
#ssl on; 這裏要註釋掉
ssl_certificate /usr/local/nginx/conf/www_iamle_com.crt;
ssl_certificate_key /usr/local/nginx/conf/www_iamle_com.key;
#以下配置省略
}

本文轉自於》》》傳送陣》》》

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章