Accessing server's web server on local network with its local IP address

You have configured both HTTP and HTTPS to connect to the same port on the backend server.

It is highly unlikely that your backend server supports both protocols on the same port.

Either use HTTP in both VirtualHosts, or use the correct port for HTTPS if your backend server supports both.


Some of the comments above got me thinking about this the right way. The approach I went with was to

  • run separate http & https servers on different ports within my Node web service,
  • update the port numbers in mydomain.ca.conf and mydomain.ca-le-ssl.conf to correspond to the right port numbers, and
  • update mydomain.ca.conf to only respond to requests from localhost or LAN as shown below.
<VirtualHost *:80>
  # We should only access the web server via http if on localhost
  # or within LAN.
  <Location />
    Require local
    Require ip 10.0.0.0/24
  </Location>
  ...

With all this in place, I can now access http://10.0.0.13 from inside my local network and https://mydomain.ca from outside my local network.