1. 程式人生 > >Nginx Server 上80,443端口。http,https共存

Nginx Server 上80,443端口。http,https共存

ssl uri com body listen usr https 相關 archive

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/ssl/www_iamle_com.crt;
ssl_certificate_key /usr/local/nginx/conf/ssl/www_iamle_com.key;

#以下配置省略...
}

相關鏈接:

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

https://www.iamle.com/archives/1231.html

Nginx Server 上80,443端口。http,https共存