Here is what I need, when its localhost:80 I need Nginx welcome page to be served, but when its localhost:80/pass, my application(react app) to be served, here is my Nginx.conf looks like,
server {
listen 80;
server_name localhost;
location /pass {
root build;
index index.html index.htm;
proxy_pass http://localhost:3000;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
am I missing something, because it's serving me this
An error occurred. Sorry, the page you are looking for is currently unavailable. Please try again later.If you are the system administrator of this resource then you should check the error log for details.Faithfully yours, nginx.
here is my error.log
2020/09/19 21:54:00 [error] 10888#1388: *35 connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /pass HTTP/1.1", upstream: "http://[::1]:3000/", host: "localhost"
2020/09/19 21:54:39 [error] 10888#1388: *35 connect() failed (10061: No connection could be made because the target machine actively refused it) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET /pass HTTP/1.1", upstream: "http://127.0.0.1:3000/", host: "localhost"