A single server that handles both HTTP and HTTPS requests

来自linux中国网wiki
docker>Evan2017年5月20日 (六) 01:53的版本 (创建页面,内容为“ ==a single server that handles both HTTP and HTTPS requests== <pre> A single HTTP/HTTPS server It is possible to configure a single server that handles both HTTP a...”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳到导航 跳到搜索

a single server that handles both HTTP and HTTPS requests


A single HTTP/HTTPS server
It is possible to configure a single server that handles both HTTP and HTTPS requests:

server {
    listen              80;
    listen              443 ssl;
    server_name         www.example.com;
    ssl_certificate     www.example.com.crt;
    ssl_certificate_key www.example.com.key;
    ...
}


参考

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