启动、停止nginx
cd /usr/local/nginx/sbin/
./nginx 
./nginx -s stop
./nginx -s quit
./nginx -s reload
开启反向代理权限
sudo setsebool httpd_can_network_connect 1

设置https

1 添加https模块 
./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-http_ssl_module
2.覆盖配置文件 
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf 
3.配置
        # HTTPS server
#
server {
   listen 80 default backlog=2048;
   listen       443 ssl;
   server_name  stoge.cn;

   ssl_certificate      cert.pem;
   ssl_certificate_key  cert.key;

   ssl_session_cache    shared:SSL:1m;
   ssl_session_timeout  5m;

   ssl_ciphers  HIGH:!aNULL:!MD5;
   ssl_prefer_server_ciphers  on;

    location / {   
    }
    }

Kanni
22 声望0 粉丝

null


下一篇 »
centos7 git

引用和评论

0 条评论