I am trying to configure nginx for my application setup. I have a React app, and it talks to a Node backend, running at localhost:3000.
In nginx.conf
:
server { listen 80; server_name localhost; location / { root D:\....\build; index index.html; try_files $uri $uri/ /index.html; # Proxy to the Node backend proxy_pass http://localhost: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; } }
But this doesn't serve React app, just shows a page with message 'Node Authentication'.
What am I missing in my config?