server
{
    listen 5051;
    server_name 127.0.0.1;
    index index.html index.htm index.php;
    root  {$SERVER_PATH}/pgadmin;

    #error_page   404   /404.html;

    #AUTH_START
    auth_basic "Authorization";
    auth_basic_user_file {$SERVER_PATH}/pgadmin/pg.pass;
    #AUTH_END

    location / {
        proxy_pass http://unix:/tmp/pgadmin4.sock;
    }

    access_log  {$SERVER_PATH}/pgadmin/access.log;
    error_log  {$SERVER_PATH}/pgadmin/error.log;
}