Rumah  >  Soal Jawab  >  teks badan

nginx - Ngnix http转https

Adakah tutorial yang lebih terperinci?
Cuba menjadi semudah dan semudah mungkin.

漂亮男人漂亮男人2714 hari yang lalu579

membalas semua(1)saya akan balas

  • 天蓬老师

    天蓬老师2017-05-16 17:13:12

    Konfigurasikan dalam LNMP环境为例子
    首先你得买ssl 证书,然后在/usr/local/nginx/conf目录创建一个目录,将ssl证书放进去,然后在nginx.conf的server, sandarkan dahulu apabila membuat perubahan

    server
       {
       #listen 80;
          listen 443;
        server_name www.yourdomain.com;
                ssl      on;
                    ssl_certificate    ./你的目录/XXX.crt;
                    ssl_certificate_key ./你的目录/XXX.key;
                    ssl_session_timeout 5m;
                    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
                    ssl_ciphers AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL;
                    ssl_prefer_server_ciphers on;
                    index index.html index.htm index.php default.html default.htm default.php;
        root  /home/wwwroot/www.yourdomain.com;
        location / {
                # phpbb uses index.htm
                index index.php index.html index.htm;
                try_files $uri $uri/ @rewriteapp;
    
            }
    

    balas
    0
  • Batalbalas