Answer the question
In order to leave comments, you need to log in
How to host a React project and an API on the same VDS?
Nginx is already installed on the server, projects are placed and running, the
application works on the path /
Api on / api
I noticed that the application does not access the API, after the tests, I realized that the api routes are not being executed.
Is there any solution or article that will describe in detail what needs to be done to make it work?
Answer the question
In order to leave comments, you need to log in
of course, there is little information, but: check the nginx config first of all (!!!) most likely nginx is configured crookedly for you (because I suspect that you have an attachment and an apishka - these are most likely two daemons on different ports, and nginx proxies it's all on one backend)
Author, would you at least throw some logs, where what requests go from frontend to backend. This is not a forum for telepaths. Imagine how you can answer your question without having information?
Now, if I write to you: "I have a problem, there are no requests from frontend to backend. Nginx restarted."
What do you recommend?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question