Why when I adding location in nginx it gives 403 Forbidden

Hello, why when I’m trying to add something like

location /manage {
            root /var/www/your_domain/html;
            index index.html index.htm index.nginx-debian.html;
            try_files $uri $uri/ =404;
}

It gives a 403 Forbidden?
Thanks

It may be many things! It isn’t even about Open edX, so you can check the usual nginx files and documentation. There are log files like /var/log/error.log (may be in another location, I forgot) that may have more information.
Also check that everything exists (the folder, the files) and that the user that is running nginx has permission to access the files.
Mostly, experiment. With different paths, simpler setup etc.

Thanks for answering!
But logs are empty. I checked /var/log/nginx/access.log and /var/log/nginx/error.log
For folder /var/www/ I gived chmod -R 777.
But why I’m getting 403?

Try in /edx too, e.g. /edx/var/log/nginx/access.log.
And experiment with more cases. For instance, inside the { … } brackets you could write just return 301 https://somewhere.xyz/; and then nginx should start redirecting. If it doesn’t, then the issue is in the rest of the lines (location /…). But if it works then you can proceed adjusting the lines inside the { … }.

Redirect working. But when I’m showing path to folder now it gives 404

You can continue experimenting. For instance place an index.html in every place and see which one matches.

Note that you are matching with location /manage so, this will only work for files and folders that have that name. You’ll have to call your file in a way that matches. Maybe create a manage folder in /var/www/your_domain/html/

You can also use regular expressions when matching the path, like location ~ /manage (this matches a lot), and there’s also location = /manage (this matches just this one path, if I remember correctly). Experiment…

Thanks, solved.
Issue was in react config.