赞
踩
ngixn默认的./configure命令是不带ssl模块的,需要手动指定–with-http_ssl_module
./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module
make &&make install
# /usr/local/nginx/conf/nginx.conf # 修改用户为root,在配置文件nginx.conf的第一行 user root; worker_processes 1; ... # 配置443端口ssl server { listen 443 ssl; #域名 server_name mes.fotile.com.cn; # ssl证书的路径(相对路径) ssl_certificate ssl/fotile.com.cn.crt; ssl_certificate_key ssl/fotile.com.cn.key; ssl_session_cache shared:SSL:60m; ssl_session_timeout 60m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; #ssl_ciphers HIGH:!aNULL:!MD5; ssl_ciphers ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!eNULL:!NULL:!DH:!EDH:!AESGCM; ssl_prefer_server_ciphers on; location / { root html; index index.html index.htm; } }
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。