NGINX Proxy Manager Setup Redirects to usermin

SYSTEM INFORMATION
OS type and version Debian 12
Webmin version 2.202

I originally posted multiple questions in this post: NGINX Proxy Manager Setup
and Joe asked me to refrain from doing that so this is a follow up to that original post with the second question I was asking.

I’ve setup NGINX Proxy Manager (the gui version [https://nginxproxymanager.com). I have configured everything to work nicely except the redirects to usermin and virtualmin admin respectively.
NGINX doesn’t like the 10000 and 20000 port redirects - I created usermin.domain.com in nginx (npm) that points to 20000 (proxy host setting is: https 192.168.1.xx port 20000). That allows me to log in BUT when logging in on usermin it automatically redirects to :20000 after successful login — Can I turn this off? I already have a domain pointing to 20000 so would like to prevent this redirect -how and where to disable? Same for virtualmin and port 10000 - I have a domain setup that automatically ports to 10000.

Example: log in to usermin.domain.com → Iogin success → I get redirected to usermin.domain.com:20000 (this is insecure and wont load correctly so I have to delete the :20000 from the url ->now everything loads.

Have you followed our documentation for running Webmin (or Usermin, same thing, just a different port) behind nginx?

Yes I have - a little confused when I get to “Create a VirtualHost block” part. Where do I create the block - I have only ever created virtual servers within the gui. Also, because NPM is handling the certs do I leave this out? NPM is creating its own proxy host that handles the redirect and the certs - I guess thats the part that throws me.

# Point to files with SSL certificates for virtual host
   SSLCertificateFile /etc/ssl/domains/example.com/ssl.combined
   SSLCertificateKeyFile /etc/ssl/domains/example.com/ssl.key

I don’t have any experience with the GUI. I couldn’t say what it’s doing, but I can only imagine it’s managing the plain text config file, so maybe just go into that file and edit appropriately.

OK. There is a section to allow me to edit the proxy config in npm

But was wondering if there was a place within webmin settings to turn off the redirect (I know you can change the port) but I guess thats not possible. Ok, thanks Joe.

The Webmin (and Usermin, just in a different file) part of the configuration, including how redirects are handled, is covered in the doc I linked you to.