zxk175.conf

#使用全站加密,http自动跳转https
server {
    listen      80;
    server_name  zxk175.com www.zxk175.com;

    #禁止IP访问网站
    if ($host != 'zxk175.com') {
        rewrite ^/(.*)$ https://$server_name$1 permanent;
    }

    rewrite ^(.*)$ https://$server_name$1 permanent;
}

server {
    listen 443;
    server_name  zxk175.com www.zxk175.com;

    ssl on;
    ssl_certificate       /zxk175/nginx/nginx/cert/zxk175/zxk175.pem;
    ssl_certificate_key   /zxk175/nginx/nginx/cert/zxk175/zxk175.key;
    ssl_session_timeout 5m;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_prefer_server_ciphers on;

    location / {
        proxy_pass http://tale;
        include /zxk175/nginx/nginx/conf/conf/proxy.conf;
        root    /zxk175/tale/resources;
        index index.jsp index.htm index.html;
    }

    error_page  404              /404.html;
    error_page  500 502 503 504  /50x.html;
}

你可能感兴趣的:(zxk175.conf)