Nginx Proxy Manager, Docker, Portainer, pfSense, and Static IPs - Seeking Advice! reddit / selfhosted ---------------------------------------------------------------------- Public_Steak · 2023-10-24 17:54 Hey Reddit community, I'm facing a bit of a challenge with my current setup, and I'm hoping someone here can help me out. I've got Nginx Proxy Manager and Portainer running smoothly on one Ubuntu VM, while AApanel is on another VM. The aapanel docker is connected to portainer. The goal is to route AApanel's traffic through Nginx Proxy Manager, ultimately enabling me to host multiple WordPress websites. While I've set up port forwarding correctly, it seems AApanel isn't routing through Nginx as expected. Here's what I've done: I've set up two VMs: VM1 with Nginx Proxy Manager and Portainer, and VM2 with AApanel. I've configured a WAN static IP address to port forward to my AApanel's internal LAN IP and port 8886. However, it seems to be bypassing Nginx Proxy Manager completely and works independently without any Nginx configuration. This situation is a bit confusing. To illustrate, the static IP works when I access it directly like this: 187.154.49.85:8889/aapanel (please note that this is not my actual IP). It functions correctly in this case. I've also connected my Cloudflare domain/subdomain as aapanel.domain.com . However, it didn't work as expected. I even tried accessing it via aapanel.domain.com/aapanel , but still, no luck. My primary goal here is to understand how to set up this configuration properly so that I can apply it to multiple WordPress websites, or other applications like Nextcloud in the future. Without setting up indvidiual nginx proxy per docker and I will get lost on the configuration Any guidance or insights on how to get Nginx Proxy Manager to handle this routing correctly would be greatly appreciated. I'd like to ensure that Nginx Proxy Manager is properly managing the traffic for all the services I plan to host in the future. Despite these efforts, I'm still not able to access AApanel through the domain or subdomain I've set up. Can anyone offer guidance or suggestions on what might be going wrong? I'd greatly appreciate your assistance in troubleshooting and resolving this issue. Thank you in advance for your help! Any guides youtube videos etc.. would be grateful ---------------------------------------------------------------------- thekrautboy · 2023-10-24 18:05 > I've configured a WAN static IP address to port forward to my AApanel's internal LAN IP and port 8886. However, it seems to be bypassing Nginx Proxy Manager completely and works independently without any Nginx configuration. This situation is a bit confusing. Uhm, of course this doesnt work? When you portforward to the IP of your "aapanel", then of course you will reach the aapanel and not the reverse proxy. You need to portforward to the reverse proxy. And in the proxy you configure it to redirect a specific requested DNS to the local IP of aapanel. You will need working DNS for that too, redirecting IPs does not work with a reverse proxy. So set up something like a local Pihole, add your custom entry like `aapanel.home` to it which points to the IP of the proxy, and in the proxy point that name to the IP of aapanel. ---------------------------------------------------------------------- Public_Steak · 2023-10-24 18:33 Is it possible to setup the DNS within pfsense rather than installing another docker with pihole? I think the answer is yes but im not 100% sure ---------------------------------------------------------------------- thekrautboy · 2023-10-24 18:34 I dont use pfSense myself but OPNsense, but i am pretty confident pfSense can run a basic DNS server. Ask /r/pfSense ---------------------------------------------------------------------- brod33p · 2023-10-24 22:21 You don't need pihole. It would look something like this: aapanel.domain.com --> resolves to 1.2.3.4 (ie. your public static IP) set on cloudflare --> on pfsense, NAT tcp 80/443 from that IP to nginx internal IP --> on nginx, proxy aapanel.domain.com to 192.168.3.11:8889 ---------------------------------------------------------------------- Public_Steak · 2023-10-25 04:24 Got it working thanks. Was confused about needing pihole. ---------------------------------------------------------------------- thekrautboy · 2023-10-25 05:26 > Was confused about needing pihole. Nobody said you need a Pihole. > You will need working DNS for that too, redirecting IPs does not work with a reverse proxy. So set up something like a local Pihole > I'm assuming that pihole DNS can be used for an internal domain name system instead of using ips is that right for example aapanel.home? Thats what any DNS does, wether its Pihole or Technitium or something built into pfSense or whatever. All DNS translates hostnames to IPs. Thats the main function of it. ---------------------------------------------------------------------- Public_Steak · 2023-10-25 06:46 Sure but the DNS used in this case is cloudflare with a real domain ---------------------------------------------------------------------- thekrautboy · 2023-10-25 07:04 Yes that works too. Doesnt make any difference.