Hello, I am trying to make a connectio between a front-end developed in react and a backend in expressjs.
Here is my configuration:
server{
server_name mvp.greencarlane.com;
root /var/www/mvp.greencarlane.com/html;
index index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
location /api/ {
# Add a trailing slash if missing
if (!-f $request_filename) {
rewrite [^/]$ $uri/ permanent;
}
proxy_pass http://149.100.159.217:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
I get error 404 on GET
https://mvp.greencarlane.com/quiz
[HTTP/1.1 404 Not Found 275ms]
There is only the login route that is fucntioning when I reload the root