How to proxy_pass to my app. But file not found 404!!

November 8, 2017 1k views
Applications Deployment JavaScript DigitalOcean LEMP Nginx Node.js One-Click Install Apps Ubuntu 16.04

I have react application (next js) run on localhost:7878. And I config nginx in location proxy_pass localhost:7878. And after that i view page source in my browser and open path file js. But can not find it.

What do i have to do?

Thankyou.

1 Answer

Sorry to see that your question hasn't received an answer yet. Unfortunately, without more information, it is unlikely that an answer for this specific issue can be provided. For people still landing here via search, running a Next.js app in production is much like running any Node app. Check out this tutorial for all the details on getting a Node app running behind an Nginx reverse proxy:

by Brennen Bearnes
Node.js is an open source JavaScript runtime environment for easily building server-side and networking applications. Node.js applications can be run at the command line but this guide focuses on running them as a service using PM2, so that they will automatically restart on reboot or failure, and can safely be used in a production environment.
Have another answer? Share your knowledge.