I put the files of my React build in: root/website.com/site/public
.
My /etc/nginx/sites-available/default
:
server {
listen 80 default_server;
root /root/website.com/site/public/;
server_name 00.000.00.000;
index index.html index.htm;
location / {
try_files $uri $uri/ =404;
}
}
I get a bad gateway error when I go to my ip address. Do I need to run npm start
to get my index.html
to show up?
For some reason when I run npm start
it searches for index.html
in /site/src
then if I change the name of public
to src
it searches in site/public
.