Nginx and Panel configuration problem

My configuration is bit different and works:

location ~ /panel { # with the ~
    index index.php;
    try_files $uri $uri/ /panel/index.php?$uri&$args;
}

Does that work for you?