I have a Nextjs application running on https://localhost port 3000 on my server and it is accessable through https://rgb.irpsc.com:3000/citizen/hm-2000001. The hm-2000001 part is dynamic and can range from hm-2000000 to any value. What I want to do is to make this application accessable without specifying a port. What I mean is that when a user types https://rgb.irpsc.com/citizen/hm-2000003 in the browser address bar, the related page shows up. I have configured this in nginx, but it seems to be not working. I'd be so grateful for any help from you guys. Here's my nginx configuration:
location /citizen {
proxy_pass https://localhost:3000/citizen;
}