Nextcloud + Nginx Proxy with no standard port 80/443

Hi guys,

I’m trying to configure Nextcloud behind Nginx Proxy Manger. However, I had to use other ports instead of 80/443, because my internet provider blocks these ports.

So I needed to do the following configuration to access any service externally.

Router (foward port 27080 to port 80 and 27443 to 443)
Nginx Proxy Manager (running using default ports 80 and 443)

Locally it works fine, including SSL, but when I try to connect externally like myhost.com:27443, it redirects to “https://myhost.com/login” (without port 27443)

I manage to make it work, adding “overwritehost” with myhost.com:27443 to the config.php… but this changes any url (including local access) to my external one

how can I fix this issue to make it accessible externally?

(and no, I don’t want to use cloudflare tunnel)

----- edit -----
Also I noticed into the web browser console a message after enter manually add “/login” and try to login (but didn’t redirect)

“Refused to send form data to ‘https://myhostcom:27443/login’ because it violates the following Content Security Policy directive: “form-action ‘self’”.”

no one know what happen?