DBMNG数据库管理与应用

抓住自己最有兴趣的东西,由浅入深,循序渐进地学……
当前位置:首页 > 服务器配置 > nginx

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;


#以下配置省略


}



转自:http://www.iamle.com/archives/1231.html


http://nginx.org/en/docs/http/configuring_https_servers.html#single_http_https_server


本站文章内容,部分来自于互联网,若侵犯了您的权益,请致邮件chuanghui423#sohu.com(请将#换为@)联系,我们会尽快核实后删除。
Copyright © 2006-2023 DBMNG.COM All Rights Reserved. Powered by DEVSOARTECH            豫ICP备11002312号-2

豫公网安备 41010502002439号