MAC下 nginx搭建https服务器
来源:互联网 发布:男士洗面奶推荐 知乎 编辑:程序博客网 时间:2024/06/15 18:58
安装nginx
1. http://nginx.org/en/download.html下载http://nginx.org/download/nginx-1.2.0.tar.gz
2. tar -xf nginx-1.2.0.tar.gz
3. 进入解压目录 chmod a+rwx *
4. ./configure --without-http_rewrite_module --with-http_ssl_module
5. make && make install
6. sudo /usr/local/nginx/sbin/nginx
浏览器访问 localhost
确保机器上安装了openssl和openssl-devel
#yum install openssl#yum install openssl-devel
然后就是自己颁发证书给自己
#cd /usr/local/nginx/conf#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
至此证书已经生成完毕,下面就是配置nginx
server { listen 443; ssl on; ssl_certificate /usr/local/nginx/conf/server.crt; ssl_certificate_key /usr/local/nginx/conf/server_nopwd.key;}
然后重启nginx即可。
0 1
- MAC下 nginx搭建https服务器
- MAC下 nginx搭建https服务器
- MAC下 nginx搭建https服务器
- centos下使用nginx搭建https服务器
- centos下使用nginx搭建https服务器
- Nginx搭建HTTPS服务器
- nginx搭建https服务器
- Nginx 搭建 HTTPS 服务器
- nginx搭建https服务器
- nginx搭建https服务器
- Nginx搭建HTTPS服务器
- Nginx搭建https服务器
- nginx 搭建https服务器
- nginx搭建https服务器
- Mac下搭建nginx http点播服务器
- 使用nginx搭建https服务器
- 使用nginx搭建https服务器
- 使用nginx搭建https服务器
- 【操作系统】main.cpp
- Java集合类的类图
- Tair LDB基于Prefixkey的范围查找性能优化项目之如何建立prefix bloomfilter
- Swift数字类型之间的转换
- java 在控制台运行的时候有中文乱码
- MAC下 nginx搭建https服务器
- Windows 已在棒材计数分钢系统.exe 中触发一个断点
- SQL:??合并运算符
- CoInitialize \CoInitializeEx\AfxOleInit
- Asmack开发系列之XMPP概述
- 0821安卓班 2014_09_05 问题解答
- poj1056 & hdu1305 & zoj1808 Immediate Decodability(字典树变形)
- Perl中的程序注释:单行注释和多行注释
- Java对Cookie的添加和查询