I'm experiencing a complicated problem that I'm looking for help on.
I have Wordpress served by Apache2 on a Raspberry Pi. I have a domain name with the DNS appropriately pointed to the server. I can view and access the site using the domain name or external IP if I am not accessing from the LAN the Pi is connected to.
But, if I attempt to access the domain from my LAN, I get a connnection refused error from the server.
Here are some things I've tried, and their output:
I've attempted accessing the site with the local address (x.local). Some HTML is served, but the images, themes, and links are all pointed to domain.com, and do not load.
I've changed the home and siturl in the database to the local address; when accessing x.local,the site loads and works great... but when accessing domain.com, I get the connection refusal.
I've added an index.html to the root directory, which loads well from x.local and domain.com. This is one of the reasons I think there is a Wordpress or PHP problem, not a port forwarding, DNS, or other networking problem.
Any additional suggestions?
Running PHP 8.2, Apache 2.4, and Wordpress 6.5.3.