I am trying to set up a react app to proxy with nginx on an ec2 instance. I have server.js and react-scripts start already running on pm2 and they will deploy locally so i think it must be my config. For the record all the html is deployed at /actnow.
server {
server_name EC2 Public;
listen 127.0.0.1:80;
root /var/www/factnow/client/build;
error_page 500 502 503 504 /50x.html;
location / {
proxy_pass http://EC2 Private: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;
}
location /actnow {
index index.html index.htm;
try_files /app/cache/ $uri @fallback;
}
}
any help properly formatting this would be a life saver.