美文网首页
nignx https

nignx https

作者: 金色的清晨 | 来源:发表于2016-09-26 10:02 被阅读0次

获取证书

#openssl genrsa -des3 -out server.key 1024
#openssl req -new -key server.key -out server.csr
#openssl rsa -in server.key -out server_nopwd.key
#openssl x509 -req -days 365 -in server.csr -signkey server_nopwd.key -out server.crt

概述

  • https默认端口443
  • http默认端口80,可以对http请求跳转到https端口上

配置:

server {
    listen       443;
    ssl on;
    ssl_password_file /usr/local/nginx/conf/https/your_password;
    ssl_certificate  /usr/local/nginx/conf/https/your.crt;
    ssl_certificate_key  /usr/local/nginx/conf/https/your.key;
    ........
}

这里ssl_password_file是保存申请证书密码的文件。如果不配置每次nginx重启就会要求输入密码,同时当系统restart,nginx服务将无法启动,相关的php服务也无法启动。

相关文章

  • nignx https

    获取证书 申请证书https://startssl.com/ 生成开源证书 概述 https默认端口443 htt...

  • nignx https反向代理http服务

  • Nignx 配置反向代理

    解决问题:使用nignx完成http转https和二级域名转发,将已有http通信的web前端转为https,包括...

  • node nignx代理 静态资源处理

    nignx相关的基本操作(mac下) 1.nignx 当前启动的 配置文件路径查找:命令 nginx -t 2....

  • Nginx HTTPS

    准备工作 获取HTTP证书并上传到服务器 配置Nignx支持HTTPS协议,首先需要检查Nginx是否已经安装了S...

  • Linux简介与文件目录(一)

    如果不能简单的把事情说清楚,说明你还没有完全明白 近期,为了学习nignx,发现nignx在Linux服务器上才能...

  • Nignx 学习

    什么是nginx? Nginx 是一个高性能的 Web 和反向代理服务器 nginx 中文文档 http://ww...

  • 安装nignx

    centos8 安装PCRE - 陈文超 - 博客园 (cnblogs.com)[https://www.cnbl...

  • Nignx 启用|禁用缓存

    修改 nignx.conf 文件1、启用缓存 2 、禁用缓存

  • Docker Nignx 配置

    本文环境 docker: 3.4.2nginx: 1.21.6 下载nignx docker pull nginx...

网友评论

      本文标题:nignx https

      本文链接:https://www.haomeiwen.com/subject/pocqyttx.html