Hello! I want to use 2 domains for n8n.
1 - to access the web panel: n8n.exaple.com on port 443
2 - for webhooks wh.exaple.com on port 443
n8n works in the Docker. All requests are proxied by Nginx Proxy Manager and ACL is configured on n8n.exaple.com, when I try to go to this address, asked for a password. That’s why I can’t use webhook on this domain name.
Problem: I can’t set up 2 domains on port 443.
The problem starts when I try to set up n8n for different domain names. If I use n8n.exaple.com to port 443, then it will already be taken, and I cannot use another wh.exaple.com domain on port 443. If I set it to a different address, for example wh.exaple.com:4443 and set up a reverse proxy, then everything works fine, but in the n8n web interface, access to the webhook is displayed as wh.exaple.com:4443, although in fact it is wh.exaple.com:443(https://wh.exaple.com) because of the reverse proxy and I have to change the address myself every time I type it into the browser.
That looks overly complicated, So the first thing I would do is change n8n to go back to using port 5678 and set your container to listen on the host to 5678 as well if you want that part doesn’t really matter for what you are doing.
Next up set the URLs to not have the ports at all as they won’t be needed, The good thing with nginx and any other reverse proxy is you can have multiple sites on the same port I do this with the services I run so your proxy will listen on 443 for the connections then route the traffic based on the server name.
So in your proxy you would set up 2 entries…
wh.exaple.com which has an ACL / custom location set so only /webhook and /webhook-test can be used then you would make sure your n8n.exaple.com has your current ACL on it and redirects to the same host and port.
So with this setup you should have…
Nginx Proxy Manager listening on port 443 and directing traffic back to 5678
n8n listening on 5678 internally and in the container
This should solve your problem, The only bit I am not sure about is how you would set up the custom locations to work but I might look into that in more detail one evening as I currently use nginx proxy manager for my own setup at the moment with over 20 services all listening on 443 for connections.