I’m using the Ghost droplet to host a blog which is linked from example.com. Proxy pass has it setup at https://www.example.com/blog. This links works perfectly if I enter it into my URL bar and access it directly. However there is a link on example.com’s homepage. The link is to https://www.example.com/blog but for some reason my nginx configuration tries to 301 redirect it to http://www.example.com:443/blog. This then returns HTTP 400 “The plain HTTP request was sent to HTTPS port”
I have played around with this for the last 2 days and cant figure out what’s causing this. Seeing as the proxy_pass works fine it has to be something to do with the http redirect right? But i cant see any issues with it. I’m sure its something staring me right in the face!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Remove the 443 port from your /blog/ location. That’s redundant (you already specified https) and could be causing issues. and add “port_in_redirect off;” to your server block.