Easily configure a performant, secure, and stable NGINX server.Learn More
Proxy_Pass works when accessed directly but gives HTTP 400 when linked
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!
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.×