Re: Life getting to complicated?
| From: | Mark Rousell | Date: | Wed, 24 Apr 2019 01:03:26 +0000 |
| Subject: | Re: Life getting to complicated? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-326775@lists.php.net to get a copy of this message | ||
On 23/04/2019 22:24, Lester Caine wrote:
> This was an attempt to rule out the Hub6 as the problem, but with the
> Netgear ALSO dropping the connection not sure quite where we are ...
Sounds like it must be in BT's or Openreach's equipment. Either
something wrong with the copper between you and the cabinet, a port on
the equipment in the cabinet, or maybe something at the exchange.
> The main problem here is that the 'problem' sites are ones running
> Wordpress. My own sites don't have a problem as things like cron
> happen independent of PHP, but it was the Wordpress scheduled events
> that were messed up ... along with email but that turned out to be
> just a corrupt IP change ...
> In both cases however one accesses the dashboard via the domain name
> in order to get the at the management toolsc.
If you access the Wordpress dashboard via domain name then you could
almost certainly access it via private LAN IP address. If you need host
header to be able to reach the dashboard website on the server then
either a LAN DNS server or edited hosts file (as suggested by Curtis
Maurand) would allow you to do it.
As Curtis suggested, if it is too fiddly to change the script/Wordpress
configuration to use local LAN IP addresses then editing your hosts file
would work. Entries similar to
192.168.1.33 dashboard.myserver.com
would do it. Machines with a hosts file entry like this would skip DNS
lookups and be given the internal LAN IP instead.
Alternatively you could run an internal cacheing DNS server. In this
scenario, the local DNS server would contain entries for local servers
which would resolve to local LAN IP addresses, and would pass on any
other DNS query for the rest of the world to an upstream DNS server. For
the avoidance of doubt, the local DNS server would be for internal LAN
use only. You could use Pi-hole for this (I think), PFSense (as Curtis
suggested) or OPNSense, or almost any other DNS server software of your
choice.
> There are four local servers but only 2 are visible from outside. One
> on each broadband line, both of which have static IPV4 addresses (but
> only BT support static IPV6 - Vodafone asked what it was when I
> requested it)
>
> The servers are SUSE Linux, Nginx, assorted PHP-FPM for 5.x, 7.0 and
> 7.2 along with Firebird and MySQL for the Wordpress sites. Obviously
> in an ideal world all four servers would be visible from either line
> so that the BT one going down would not be a problem at all. Just
> reduced bandwidth till it's back 10 minutes later ... and I THINK the
> starting point for that is to have my own DNS servers on each line but
> now I am getting out of the comfort zone ... what I have does work the
> vast majority of the time so perhaps I leave it like that :)
This can get as complicated (and expensive) as you want. :-) Also it's
not a PHP issue as such but, until someone tells me off, I'll comment here.
I think you could do this with round robin DNS. You could have one
public-facing DNS server on each broadband line (or even the same server
serving both lines). The server or servers would be the authoritative
DNS server(s) for the domains in question. These servers would resolve
public DNS queries for the web servers in a round robin fashion,
distributing served IP addresses roughly equally between the two lines.
Ideally you'd need some sort of heartbeat checking so that the DNS
server(s) can detect when one of the lines or servers has gone down and
remove that line's or server's public IP DNS entry from DNS responses
being served out (and replace it when the server or line comes back up).
--
Mark Rousell