I am trying to host 2 react apps on an NGINX server. My configuration is currently as follows:
server {
listen 80;
server_name www.domain.net;
location / {
root /var/www/portfolio_site/code/client/build;
try_files $uri /index.html;
}
location /json/ {
root /var/www/json-converter-yay/build;
try_files $uri $uri/ /json.html;
}
}
I have tried both solutions mentioned at this post: Run multiple React Apps
Which gives me a 404 error if I navigate to the /json, and a message informing me that NGINX has been set up if I navigate to root. Currently, the root location works just fine, but navigating to domain.com/json renders the index page. I have cleared my cache and tested on multiple computers, as well as verifying that I have my paths configured correctly.