I am setting up nginx to work with a React SPA. The page loads fine when I do not include a variable path (/rsvp/). But when I try (/rsvp/S0mEtH1NG), it will download the index, manifest, css files... but it doesn't actually apply those things to the index.html. I pretty much just see my index.html with nothing actually loaded.
My config looks something like this:
server {
listen 80;
server_name something.com;
location / {
root /srv/something.com/webroot;
index index.html;
}
location /rsvp {
alias /srv/rsvp/build;
try_files $uri $uri/ /rsvp/index.html;
}
}
If I have try_files $uri $uri/ /index.html
, it will load the index.html of the root (/) but with a similar issue in that it doesn't use any of the css.
Thanks for help, its much appreciated!