ngxin+ssl证书的配置

upstream moji{
    server 127.0.0.1:8081;
}

# 同时支持http请求
server{
    listen 80;
    server_name moji.zifuzaixian.com; #绑定域名
    location ~/(moji|web)/.* {
        proxy_pass       http://moji$request_uri;
        #proxy_set_header Host $host:$server_port;
        proxy_set_header Host      $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

server{
    listen 443 ssl;
    server_name moji.zifuzaixian.com #绑定域名
    index index.htm index.html index.php; #默认文件
    root /data/wwwroot/qbb; #网站根目录
    charset utf8;

    ssl on;

    ssl_certificate /opt/ssl/1_moji.zifuzaixian.com_bundle.crt;
    ssl_certificate_key /opt/ssl/2_moji.zifuzaixian.com.key;

    ssl_session_cache shared:SSL:1m;
    ssl_session_timeout 5m;

    ssl_ciphers HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers on;

    location ~/(moji|web)/.* {
        proxy_pass       http://moji$request_uri;
        #proxy_set_header Host $host:$server_port;
        proxy_set_header Host      $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }

    location ~ .*\.(html|htm|gif|jpg|jpeg|bmp|png|ico|txt|js|css|mp3|mp4|ttf)$
        {    #index index2.html;
             root /data/wwwroot/qbb;
             expires      14d;
        }
}