server {  
        listen 80;
        server_name apptest.wildfirechat.cn;
        rewrite ^(.*)$  https://apptest.wildfirechat.cn permanent;      
        location ~ / {
            index index.html index.php index.htm;
        }
}

server {
        listen 443 ssl;
        server_name apptest.wildfirechat.cn;

        root html;
        index index.html index.htm;
        client_max_body_size        30m; #文件最大大小
        ssl_certificate   cert/app.pem;
        ssl_certificate_key  cert/app.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;
        ## send request back to app server ##
        location / {
            proxy_pass http://127.0.0.1:8888; 
        }
}
