I have built an Nginx server but am having trouble getting it to serve sites that are on other servers.
I have created a config file to serve a local page which works fine - I get the Nginx default page just fine.
I added into the config by copying the default at the top of the config and added proxy_pass and http://other.ip.of.server to see if it would serve the page on the other server.
It does, but it doesn’t automatically switch to SSL, in fact if you go to http:// other server I get the default Nginx page if I go to https then I get served the correct page. So I’m not sure on how to make it automatically switch to https.
I have commented out all port 80 things in my server block config.
Also when I visit the https web site through Nginx, the default page has a certificate but the page I am tying to access via https (test.mydomain.com) doesn’t get the cert.
Not done this before so not sure what I need to do.
Help greatly appreciated.