【Linux】域名配置

1、当使用默认端口时:listen 443 ssl,同时ssl on;要关掉

2、gzip是做文件压缩用的

server {
    listen 8080;
    ssl on;
    server_name 127.0.0.1;
    ssl_certificate cert/7540799_chart.XXX.com.pem;
    ssl_certificate_key cert/7540799_chart.XXX.com.key;
    ssl_session_timeout 5m;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
    ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
    ssl_prefer_server_ciphers on;

    gzip on;
    gzip_comp_level 3;
    gzip_min_length 1k;
    gzip_vary on;
    gzip_types text/plain text/css text/xml text/javascript application/json application/x-javascript application/xml image/jpeg image/gif image/png application/javascript;

    location /xx {
        proxy_pass http://xx;
    }
    location /xxx.txt {
        root   /opt/;
        index xxx.txt;
    }
}

 

  

posted @ 2022-05-23 10:19  迷你胡丶  阅读(427)  评论(0编辑  收藏  举报