location ~* \.(ttf|ttc|otf|eot|woff)$ {

            add_header Access-Control-Allow-Origin *;

        }

        location / {

            index index.php;  

            if (!-e $request_filename){  

              rewrite ^/(.*) /index.php last;  

            }

        }


        location ~ \.php$ {

            include /opt/openresty/nginx/conf/fastcgi_params; 

            fastcgi_pass 127.0.0.1:9000;

            fastcgi_index index.php;

            fastcgi_param SCRIPT_FILENAME /var/www/html/yii2/web$fastcgi_script_name;

        }