Я пытаюсь настроить Nginx для 2 разных мест. Это мой сценарий.
www.example.com location : /var/www/example.com example.com/panel location : /var/www/example.com/panel
Попробуйте использовать: http://nginx.org/en/docs/http/ngx_http_core_module.html#try_files
location ^~ /root { root /var/www/example.com; index index.html index.htm; } location ^~ /root/react_app(or panel) { root /var/www/example.com; index index.html index.htm; try_files $uri $uri/ /root/react_app/index.html; }