I have a single non-static IP address with my ISP (Bell Canada). I started with one registered domain and established a WordPress site on Raspberry Pi #1. Everything has worked well for about 1 1/2 years with no port forwarding set up on my router. I have now a second domain on Cloudflare which I an trying to resolve to an Apache HTML site on Raspberry Pi #2, however after two weeks of trying everything I can think of, including various iterations on port forwarding, the second domain still only resolves to the WordPress site on Pi #1.
I am open to thoughts and suggestions. Be aware that I am not a coder, but can follow instructions pretty well.
Sounds like your two Pis are on the same network and attempting to host websites via the default port 80 resulting in a conflict. Consider setting up a reverse proxy. That way domain1.com:80 points to 192.168.1.x and domain2.com:80 points to 192.168.1.y and can co-exist else you may have to use an alternate port number on the second ‘web Pi’.
You can test to see if this conflict exists by changing the port on one of the Pis to another say 8000 (providing that port is free on your network) and attempting to contact that Pi via domainx.com:8000.
Thanks. I am not sure how to go about that but with you pointing me in the direction of a reverse proxy I hope Google and I are about to find out. Thanks again, I will report back.
David T
My pleasure to assist
Consider changing the default port on one of the Pis first from 80 to another free port. If you are good with that arrangement e.g. Pi1 192.168.1.1:80 and Pi2 192.168.1.2:8000 then you are all set.
With a reverse proxy you can also ingest your traffic safely over port 443 with certificates as well