 location ^~ /nginx-ui/ {
        proxy_pass      http://127.0.0.1:38080/nginx-ui/;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $host;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_connect_timeout  30s;
        proxy_read_timeout  10m;
        proxy_http_version  1.1;
}

location ^~ /ng-proxy/ {
        proxy_pass      http://127.0.0.1:38080/;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $host;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_connect_timeout  30s;
        proxy_read_timeout  10m;
        proxy_http_version  1.1;
}

location ^~ /auth-proxy/ {
        proxy_pass      http://127.0.0.1:38080/;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $host;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_connect_timeout  30s;
        proxy_read_timeout  10m;
        proxy_http_version  1.1;
}

location ^~ /trilium/ {
        proxy_pass      http://127.0.0.1:18070/;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $host;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_connect_timeout  30s;
        proxy_read_timeout  10m;
        proxy_http_version  1.1;
        proxy_cookie_path / /trilium;
}