server {
    listen 443 ssl;#监听443端口
    #server_name 购买域名后解析到该服务器上,如果没有域名,也可以给此项目单独开端口
    server_name  api.applet.xxx.com;
    root        /xxx/xxxx/xxxx;#root 项目地址
    index       index.php index.html index.htm;#项目入口文件

    #存放证书的地址.pem和.key文件
    ssl_certificate /usr/local/nginx/conf/vhost/cert/xxx.pem;
    ssl_certificate_key /usr/local/nginx/conf/vhost/cert/xxx.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;

    if (!-e $request_filename){
        rewrite ^/(.*) /index.php last;
    }

    location ~ \.php$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
    }
    error_log  /var/log/nginx/api_applet.log error;
}