Installation and use under windows nginx

  • The appropriate command:

    start nginx.exe install nginx

    nginx.exe -s stop stop nginx

    nginx.exe -s reload reload nginx

    nginx.exe -s quit exit nginx

  • windows unloaded:

    Nginx stop the process, and then delete the folder nginx can!

  • Two-way digital certificate authentication, nginx.conf configuration

    server {
    listen 443 ssl; # 注意ssl
    server_name localhost;

      #============【 add ↓】============
    
      ssl_verify_depth 5;     #证书链长度
      ssl on;
      ssl_certificate           c:/tx/sj/server1.cer;   # base64编码的cer文件(下同)
      ssl_certificate_key       c:/tx/sj/server1.key;   # 注意路径斜杆
      ssl_client_certificate    c:/tx/sj/根证书.cer;
    
      ssl_session_cache    shared:SSL:1m;
      ssl_session_timeout 5m;
      ssl_verify_client on;
    
      ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
      ssl_ciphers  HIGH:!aNULL:!MD5;
      #ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
      ssl_prefer_server_ciphers on;
    
      #============【 add ↑】============

reference

Guess you like

Origin www.cnblogs.com/anjun-xy/p/11250411.html