Ubuntu下,Nginx普通安装后想要加入ssl支持model
来源:互联网 发布:mac里的照片如何导出 编辑:程序博客网 时间:2024/06/03 22:48
安装nginx的时候忘记加入--with-http_ssl_module 了。
步骤如下:
1. 使用参数重新配置:
./configure --with-http_ssl_module(可以加入多个需要的模块)
如果报SSL错,安装:sudo apt-get install libssl-dev 或者:sudo apt-get install openssl
2. 重新编译:make
3. 覆盖安装(注意把一些配置文件保存好)
make install,#覆盖安装(把自己改过的文件备份,然后再覆盖安装)
附录,SSL证书安装。
1.创建不受信任的SSL Key:
$ cd /usr/local/nginx/conf
$ openssl genrsa -des3 -out server.key 1024
$ openssl req -new -key server.key -out server.csr
$ cp server.key server.key.org
$ openssl rsa -in server.key.org -out server.key
$ openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
2.编辑 nginx.conf
listen 443;
ssl on;
#certfile
ssl_certificate /usr/local/nginx/conf/server.crt;
#keyfile
ssl_certificate_key /usr/local/nginx/conf/server.key;
nginx停止/启动:
停止
ps -ef|grep nginx
kill -QUIT xxxx
启动
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
步骤如下:
1. 使用参数重新配置:
./configure --with-http_ssl_module(可以加入多个需要的模块)
如果报SSL错,安装:sudo apt-get install libssl-dev 或者:sudo apt-get install openssl
2. 重新编译:make
3. 覆盖安装(注意把一些配置文件保存好)
make install,#覆盖安装(把自己改过的文件备份,然后再覆盖安装)
附录,SSL证书安装。
1.创建不受信任的SSL Key:
$ cd /usr/local/nginx/conf
$ openssl genrsa -des3 -out server.key 1024
$ openssl req -new -key server.key -out server.csr
$ cp server.key server.key.org
$ openssl rsa -in server.key.org -out server.key
$ openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
2.编辑 nginx.conf
listen 443;
ssl on;
#certfile
ssl_certificate /usr/local/nginx/conf/server.crt;
#keyfile
ssl_certificate_key /usr/local/nginx/conf/server.key;
nginx停止/启动:
停止
ps -ef|grep nginx
kill -QUIT xxxx
启动
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
阅读全文
0 0
- Ubuntu下,Nginx普通安装后想要加入ssl支持model
- linux下安装nginx,支持rewrite、ssl
- linux下安装 nginx 支持ssl
- ubuntu下安装nginx,支持https
- 在Ubuntu 13.10 下安装支持SSL的Apache
- 在Ubuntu 13.10 下安装支持SSL的Apache
- Nginx下让SSL支持SPDY协议
- Nginx下让SSL支持SPDY协议
- ubuntu下apt-get安装nginx后的升级
- ubuntu中安装nginx并配置SSL
- ubuntu下nginx安装
- ubuntu下安装nginx
- Ubuntu下安装Nginx
- Ubuntu下安装Nginx
- ubuntu 下nginx安装
- Ubuntu 下安装 nginx
- ubuntu下安装nginx
- ubuntu下安装nginx
- Matlab中变量的动态定义
- Unity入门操作_025_01
- 你真的会用面包屑导航吗?
- dubbo
- matlab2c使用c++实现matlab函数系列教程-sort函数
- Ubuntu下,Nginx普通安装后想要加入ssl支持model
- Android——PopupWindow
- 用装饰模式优化代码的一个简单例子
- 组合导航初理解
- java用socket客户端和服务器之间通信,传输文件经典例子(详细分析)
- python求解在给定递减数组中寻找两个数和等于定值,乘积最小
- Professor Ben 唯一分解定理:因子的因子个数
- oracle高级查询(二)
- 第三课: 易语言大漠剑侠情缘多线程木人巷检测游戏开启