Bala Chandar
Bala Chandar

Reputation: 47

How to configure Nginx Proxy Manager to serve a project on port 3000 with a specific path?

I'm using Nginx Proxy Manager to manage my reverse proxies, and I have a project running on port 3000. I want to access this project through a URL like https://www.example.com/planka. I added the proxy host in Nginx Proxy Manager, but I'm not sure how to configure it properly to achieve this.

Here are the details of my setup:

Nginx Proxy Manager: Version X.X Project: Running on port 3000 Desired URL: https://www.example.com/planka Steps I've taken: Added a new Proxy Host in Nginx Proxy Manager with the following settings:

  1. Domain Names: www.example.com
  2. Scheme: http
  3. Forward Hostname / IP: here i have ip address
  4. Forward Port: 3000
  5. Enable Websockets Support: Checked
  6. Block Common Exploits: Checked
  7. SSL: Enabled, Force SSL

In the Advanced tab, I added the following configuration (not sure if this is correct):

location /planka/ {
proxy_pass http://localhost:3000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

}

However, when I navigate to https://www.example.com/planka, I get a 404 error or the application doesn't load correctly.

My questions: Is the configuration in the Advanced tab correct? Do I need to modify any other settings in Nginx Proxy Manager to make this work? Are there any additional steps required to ensure the project is served correctly under the /planka path? Any help would be greatly appreciated!

Upvotes: 0

Views: 393

Answers (1)

Haknor
Haknor

Reputation: 1

Late reply but, NPM is also using port 3000. Try changing port on your project to something else

Upvotes: 0

Related Questions