我试图在我的Nginx服务器上的子文件夹中部署React应用程序.
此React应用程序的位置结构如下:www.example.com/reactApp.
我尝试设置我当前的nginx.conf,如下所示:
server {
..other configs..
location /reactApp {
root /var/www;
index reactApp/index.html;
try_files $uri $uri/ /index.html;
}
..other configs..
}
Run Code Online (Sandbox Code Playgroud)
这没效果.我需要更改什么才能修复子文件夹路由?