Answer the question
In order to leave comments, you need to log in
Is it possible to put ReactJS on nginx?
Hello, I would like to understand one question, I built a ReactJS site through Webpack and tried to put it on nginx, I started having problems with routing and access to my bundle. I so understand it is necessary to request the address. In general, is it possible to upload the application that I built to the statics server, I read a lot of things, but I didn’t understand the essence. Or be sure to raise the nodejs server for all this
Answer the question
In order to leave comments, you need to log in
You need to set up nginx like this:
location / {
root /var/www;
index index.html;
try_files $uri $uri/ /index.html;
}
<base href="/">
so that relative paths work.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question