Nginx响应80和443端口的访问配置

仓廪实则知礼节,衣食足则知荣辱。这篇文章主要讲述Nginx响应80和443端口的访问配置相关的知识,希望能为你提供帮助。
server
        listen 80;
        server_name www.test.com;
        rewrite ^(.*)$   https://$host$1 permanent;
   
    server
        listen 443;
        server_name   www.test.com;
【Nginx响应80和443端口的访问配置】

        ssl on;
        ssl_certificate /nginx/cert/scs1665496843144_www.test.com_server.crt;
        ssl_certificate_key /nginx/cert/scs1654683262336144_www.test.com_server.key;
        ssl_session_timeout 5m;
        ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
        ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
        ssl_prefer_server_ciphers on;
  ......


    推荐阅读