Nginx一个server主机上80、433http、https共存

时间:2017-07-02

如果一站点既要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;

#以下配置省略

}

上一条:Apache httpd SSL VirtualHost 多站点https协议虚拟主机配置 下一条:Nginx的端口修改问题

相关文章

最新文章