I'm using a Windows server, that is behind a Nginx proxy within a VPN, as a development workstation. I am trying to connect to a Moodle server in the same subnet using either a public or private host name. I can ping the public host name, e.g. moodle.mydomain.com, but a browser fails to connect to that same public site name. If I use a private host name, i.e. moodle.vpn3.mydomain.com, or a local IP Address, 192.168.1.175, a browser connects initially, but subsequent pages revert to using the public host name, which then fails to connect. This is because of the settings, $CFG->wwwroot = 'http:/public-hostname'; and $CFG->reverseproxy = true;, in Moodle’s config.php, which only allows a single hostname for the website. (Note if I set $CFG->reverseproxy = false; then from outside, the browser returns "too many redirects". How can I utilize both a public and private site name to access my Moodle server from inside or outside my VPN, respectively? Alternatively, how can I configure my Nginx proxy and/or my DNS to allow HTTP connections to a public host name from inside my VPN?
Your nginx proxy sounds like it is not setup right with the proper bindings to public/private ports and IP's, or in this case your network interfaces. Are you hosting this locally on your own system or a remotely hosted windows system?