NGINX- different web paths to different folders

I need to redirect different web paths to different folders on server.

http://test.local/site1/ => /srv/site_1/src/public
http://test.local/site2/ => /srv/site_2

tried such config, but it does not work

server {
    server_name test.local;
    root /srv;

    index index.html;

    location /site1/ {
        alias /srv/site_1/src/public;

        try_files $uri $uri/ /index.php?$args;

        fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location /site2/ {
        alias /srv/site_2;

        try_files $uri $uri/ /index.php?$args;

        fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        include fastcgi_params;
    }
}