MAC下 nginx搭建https服务器
来源:互联网 发布:淘宝客在哪里找产品 编辑:程序博客网 时间:2024/06/05 01:14
转自:http://blog.csdn.net/tiantiandjava/article/details/39077107
安装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即可。
- 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服务器
- 6、spring-boot 定时任务和异步实现
- 异常处理
- C语言求1000以内守形数
- gradle 参数配置监听
- Gradle构建脚本基础
- MAC下 nginx搭建https服务器
- mybatis二级缓存联表查询需要注意的问题
- 使用apache自带的ab压力测试工具测试网站性能
- 小团队能做大系统:Cloud_Native云原生架构实践
- ScrollViewOnTou顶部背景折叠的滚动页面
- 7、spring-boot日志管理
- 测试一下
- spark-sql-求补集
- Elicpse使用技巧-打开选中文件文件夹或者包的当前目录