Nginx 搭建 HTTPS 服务器
2014-06-27 16:58
465 查看
Nginx 搭建 HTTPS 服务器
首先安装 OpenSSL,用# openssl
测试是否安装成功
# 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
配置服务器
server { listen 443; ssl on; ssl_certificate /usr/local/nginx/conf/server.crt; ssl_certificate_key /usr/local/nginx/conf/server_nopwd.key; location /your_path { root /your/root/directory; index index.html index.htm; } }
参考
http://www.cnblogs.com/tintin1926/archive/2012/07/12/2587311.html http://www.heyuan110.com/?p=1285相关文章推荐
- 使用nginx搭建https服务器
- MAC下 nginx搭建https服务器
- 搭建https+nginx服务器
- Linux上Web服务器搭建(JDK+nginx+https)
- Nginx-搭建https服务器
- 使用nginx搭建https服务器
- centos下使用nginx搭建https服务器
- Nginx搭建HTTPS服务器
- 使用nginx搭建https服务器
- 使用nginx搭建https服务器
- 使用nginx搭建https服务器
- nginx搭建https服务器
- 使用nginx搭建https服务器
- Nginx搭建HTTPS服务器
- Nginx搭建HTTPS服务器
- MAC下 nginx搭建https服务器
- Nginx搭建HTTPS服务器和强制使用HTTPS访问的方法
- Nginx搭建HTTPS服务器和强制使用HTTPS访问的方法
- centos下使用nginx搭建https服务器
- Nginx搭建https服务器