系统相关
首页 > 系统相关> > 【Linux】域名配置

【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;
    }
}

  

标签:javascript,application,text,image,配置,ssl,域名,Linux,gzip
来源: https://www.cnblogs.com/minihu/p/16300238.html