Home > Backend Development > PHP Tutorial > 如果架设https网站?

如果架设https网站?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:29:38
Original
1059 people have browsed it

HTTPS更安全,哪如何架设成这个安全的协议呢?

回复内容:

HTTPS更安全,哪如何架设成这个安全的协议呢?

之前写过的

http://segmentfault.com/a/1190000002958542

key(服务器私钥) => csr(Certificate Signing Request,证书签发请求) => crt(证书)
上面几个东西都可以用openssl生成.

  1. 生成服务器.key文件

  2. 根据.key文件生成.csr文件

  3. 提交.csr给证书授权中心CA(Certificate Authority)

  4. CA根据.csr制作.crt证书文件(CA认证后签发的服务器证书)和.ca文件(机构的公钥证书).
    也可以自己用openssl生成crt证书,不过浏览器会警告用户证书没有被认证,但不影响通信加密.

Nginx提供有ngx_http_ssl_module模块,你用ssl_certificate_key指令指定key文件就好:
http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_certificate_key

<code>server {
    listen              443 ssl;
    keepalive_timeout   70;

    ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers         AES128-SHA:AES256-SHA:RC4-SHA:DES-CBC3-SHA:RC4-MD5;
    ssl_certificate     /usr/local/nginx/conf/cert.pem;
    ssl_certificate_key /usr/local/nginx/conf/cert.key;
    ssl_session_cache   shared:SSL:10m;
    ssl_session_timeout 10m;
}</code>
Copy after login

上淘宝搜HTTPS证书或者SSL证书,然后一堆商家愿意手把手教你

去下载一个SSL精灵,可以一键申请,自动部署SSL证书,目前支持沃通CA的免费SSL证书。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template