<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>400 bad request &#8211; moneyslow.com</title>
	<atom:link href="https://moneyslow.com/tag/400-bad-request/feed" rel="self" type="application/rss+xml" />
	<link>https://moneyslow.com</link>
	<description>making money with technology</description>
	<lastBuildDate>Sat, 02 Nov 2019 03:33:25 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.5</generator>
	<item>
		<title>400 bad request The plain HTTP request was sent to HTTPS port解决办法</title>
		<link>https://moneyslow.com/400-bad-request-the-plain-http-request-was-sent-to-https-port%e8%a7%a3%e5%86%b3%e5%8a%9e%e6%b3%95.html</link>
		
		<dc:creator><![CDATA[moneyslow]]></dc:creator>
		<pubDate>Mon, 14 Oct 2019 00:18:36 +0000</pubDate>
				<category><![CDATA[newest]]></category>
		<category><![CDATA[400 bad request]]></category>
		<category><![CDATA[nginx]]></category>
		<guid isPermaLink="false">https://moneyslow.com/?p=9259</guid>

					<description><![CDATA[现象：https可以访问，但是http报400 bad request错误。 看报错： 本以为是个牛逼的配置，没想到报错了。 先查400状态码的解释，HTTP/1.1对400 Bad Request的定义： 1、语义有误，当前请求无法被服务器理解。除非进行修改，否则客户端不应该重复提交这个请求。 2、请求参数有误。 这就很好理解了，我们又没有参数，肯定是第一个原因，我们试图通过HTTP访问网站，这个请求被重定向到HTTPS。 if ($ssl_protocol = "") { rewrite ^ https://$server_name$request_uri? permanent; } Nginx的配置里是有“ssl on”这一条的，所以肯定使用SSL交互，但是你的request都是HTTP请求，所以就是bad request，于是就是80的请求无法被服务器的443理解。 so，把nginx里的ssl on注释掉，问题解决。 2019年11月2日更新： 最新情况发现，按照以上的解决办法简单注释ssl on，并没有效果，如果用chrome浏览器打开隐私窗口，访问https页面，依据报400错误。用curl来验证： $ curl -I http://moneyslow.com HTTP/1.1 400 Bad Request Server: nginx/1.14.0 (Ubuntu) Date: Sat, 02 Nov 2019 03:09:46 GMT Content-Type: text/html Content-Length: 280 Connection: close header返回400错误依旧。 实际上，解决方法非常简单。在“listen”字符串下的服务器部分，我只需要添加： [&#8230;]]]></description>
		
		
		
			</item>
	</channel>
</rss>
