<?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>Techy Things &#187; nginx</title>
	<atom:link href="http://tech.yipp.ca/category/nginx/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech.yipp.ca</link>
	<description>Just another Yipp.ca Blogs site</description>
	<lastBuildDate>Thu, 01 May 2025 18:06:28 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.38</generator>
	<item>
		<title>Nginx on port 443 won&#039;t serve page</title>
		<link>http://tech.yipp.ca/nginx/nginx-port-443-wont-serve-page/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=nginx-port-443-wont-serve-page</link>
		<comments>http://tech.yipp.ca/nginx/nginx-port-443-wont-serve-page/#comments</comments>
		<pubDate>Wed, 14 Apr 2021 17:34:24 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=3946</guid>
		<description><![CDATA[<p>Question: I am telling nginx to listen on port 443 and it doesn't work even though my config test is passing. What's wrong? server { listen 443; server_name localhost; server_tokens off; # These are&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="http://tech.yipp.ca/nginx/nginx-port-443-wont-serve-page/">Nginx on port 443 won't serve page</a> appeared first on <a rel="nofollow" href="http://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Question: I am telling nginx to listen on port 443 and it doesn't work even though my config test is passing. What's wrong?</p>
<p>server {<br />
listen 443;<br />
server_name localhost;<br />
server_tokens off;<br />
# These are the same certs vfcp has been using.<br />
ssl_certificate /etc/pki/tls/certs/localhost.crt;<br />
ssl_certificate_key /etc/pki/tls/private/localhost.key;<br />
ssl_session_timeout 5m;<br />
ssl_protocols TLSv1.1 TLSv1.2 TLSv1.0;<br />
ssl_ciphers EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH;<br />
ssl_prefer_server_ciphers on;<br />
(...)<br />
}</p>
<p>Answer:</p>
<p>You are missing the "ssl on;" directive. You can either specify it with</p>
<p>A) Adding ssl after 443:<br />
server {<br />
listen 443 <strong>ssl</strong>;</p>
<p>or</p>
<p>B) add a new line insider server {} with ssl on;</p>
<p>server {<br />
listen 443;<br />
ssl on;</p>
<p>Note that only solution (B) is compatible with npm module nginx-conf 1.X (I didnt try 2.X).</p>
<p>&nbsp;</p>
<p>The post <a rel="nofollow" href="http://tech.yipp.ca/nginx/nginx-port-443-wont-serve-page/">Nginx on port 443 won't serve page</a> appeared first on <a rel="nofollow" href="http://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.yipp.ca/nginx/nginx-port-443-wont-serve-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx responds Content-Type: application/octet-stream for images</title>
		<link>http://tech.yipp.ca/nginx/nginx-responds-content-type-applicationoctet-stream-images/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=nginx-responds-content-type-applicationoctet-stream-images</link>
		<comments>http://tech.yipp.ca/nginx/nginx-responds-content-type-applicationoctet-stream-images/#comments</comments>
		<pubDate>Fri, 07 Aug 2020 22:04:35 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=3650</guid>
		<description><![CDATA[<p>Content-Type: application/octet-stream In nginx.conf you will have something like http { ## # Basic Settings ## (...) include /etc/nginx/mime.types; default_type application/octet-stream; (...) } Possible Problem 1 : It is possible that nginx doesnt have&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="http://tech.yipp.ca/nginx/nginx-responds-content-type-applicationoctet-stream-images/">Nginx responds Content-Type: application/octet-stream for images</a> appeared first on <a rel="nofollow" href="http://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<div class="header-name">Content-Type: application/octet-stream</div>
<div class="header-name"></div>
<div class="header-name">In nginx.conf you will have something like</div>
<div class="header-name"></div>
<pre class="header-name">http {

   ##
   # Basic Settings
   ##
   (...)

   include /etc/nginx/mime.types;
   default_type application/octet-stream;

   (...)
}</pre>
<div class="header-name">Possible Problem 1 : It is possible that nginx doesnt have access to /etc/nginx/mime.types</div>
<div class="header-name"></div>
<div class="header-name">Possible Problem 2 : In my case I had an extra types {} block in my server {} config of my sites-available/mysite.conf that I had added for RTMP streaming which was overriding the default types.</div>
<div class="header-name"></div>
<div class="header-name">server {</div>
<div class="header-name">(...)<br />
# this will mess up the whole site and images<br />
types {<br />
application/vnd.apple.mpegurl m3u8;<br />
video/mp2t ts;<br />
text/html html;<br />
application/dash+xml mpd;<br />
}</div>
<div class="header-name">}</div>
<div class="header-name"></div>
<div class="header-name"></div>
<p>The post <a rel="nofollow" href="http://tech.yipp.ca/nginx/nginx-responds-content-type-applicationoctet-stream-images/">Nginx responds Content-Type: application/octet-stream for images</a> appeared first on <a rel="nofollow" href="http://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.yipp.ca/nginx/nginx-responds-content-type-applicationoctet-stream-images/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>readv() failed (104: Connection reset by peer) while reading upstream</title>
		<link>http://tech.yipp.ca/nginx/readv-failed-104-connection-reset-peer-reading-upstream/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=readv-failed-104-connection-reset-peer-reading-upstream</link>
		<comments>http://tech.yipp.ca/nginx/readv-failed-104-connection-reset-peer-reading-upstream/#comments</comments>
		<pubDate>Mon, 04 Nov 2019 17:09:38 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[nginx]]></category>
		<category><![CDATA[node.js]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=3416</guid>
		<description><![CDATA[<p>[error] 1528#1528: *599 readv() failed (104: Connection reset by peer) while reading upstream, client: 10.65.11.207, server: localhost, request: "POST /apis/v2/system/upgrade/upload HTTP/1.1", upstream: "http://127.0.0.1:8085/apis/v2/system/upgrade/upload", host: "10.65.11.219", referrer: "https://10.65.11.219/admin/update" Understanding: This message "(XXX: Connection reset by&#46;&#46;&#46;</p>
<p>The post <a rel="nofollow" href="http://tech.yipp.ca/nginx/readv-failed-104-connection-reset-peer-reading-upstream/">readv() failed (104: Connection reset by peer) while reading upstream</a> appeared first on <a rel="nofollow" href="http://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>[error] 1528#1528: *599 readv() failed (104: Connection reset by peer) while reading upstream, client: 10.65.11.207, server: localhost, request: "POST /apis/v2/system/upgrade/upload HTTP/1.1", upstream: "http://127.0.0.1:8085/apis/v2/system/upgrade/upload", host: "10.65.11.219", referrer: "https://10.65.11.219/admin/update"</p>
<h2>Understanding:</h2>
<p>This message "(XXX: Connection reset by peer) while reading upstream" appears when the server backend initiates the disconnect. It is not the client that failed. Usually the server will have responded to the request with a more specific error message to help debug. In my case the response which could be viewed with Google Chrome Network Inspector was :</p>
<p>HTTP 400 Bad Request<br />
"{"code":"BadRequest","message":"maxFileSize exceeded, received 209763252 bytes of file data"}"</p>
<h2>Solution:</h2>
<p>change<br />
http_server.use(restify.plugins.bodyParser();<br />
to<br />
http_server.use(restify.plugins.bodyParser({maxFileSize: 5 * 1024 * 1024 * 1024})); // 5 GB</p>
<p>The post <a rel="nofollow" href="http://tech.yipp.ca/nginx/readv-failed-104-connection-reset-peer-reading-upstream/">readv() failed (104: Connection reset by peer) while reading upstream</a> appeared first on <a rel="nofollow" href="http://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.yipp.ca/nginx/readv-failed-104-connection-reset-peer-reading-upstream/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx rewrite rules to redirect specific files to https</title>
		<link>http://tech.yipp.ca/nginx/nginx-rewrite-rules-to-redirect-specific-files-to-https/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=nginx-rewrite-rules-to-redirect-specific-files-to-https</link>
		<comments>http://tech.yipp.ca/nginx/nginx-rewrite-rules-to-redirect-specific-files-to-https/#comments</comments>
		<pubDate>Fri, 04 Apr 2014 00:56:08 +0000</pubDate>
		<dc:creator><![CDATA[frank]]></dc:creator>
				<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://tech.yipp.ca/?p=687</guid>
		<description><![CDATA[<p>Solution : server { listen 80; listen 443 ssl; server_name localhost; location / { (...) if ($server_port = 80) { rewrite ^/(login.*)$ https://$host/$1; } } (...) }</p>
<p>The post <a rel="nofollow" href="http://tech.yipp.ca/nginx/nginx-rewrite-rules-to-redirect-specific-files-to-https/">Nginx rewrite rules to redirect specific files to https</a> appeared first on <a rel="nofollow" href="http://tech.yipp.ca">Techy Things</a>.</p>
]]></description>
				<content:encoded><![CDATA[<p>Solution :</p>
<pre>server {
  listen 80;
  listen 443 ssl;
  server_name localhost;

  location / {
    (...)
    if ($server_port = 80) {
      rewrite ^/(login.*)$ https://$host/$1; 
    }
  }
  (...)
}
</pre>
<p>The post <a rel="nofollow" href="http://tech.yipp.ca/nginx/nginx-rewrite-rules-to-redirect-specific-files-to-https/">Nginx rewrite rules to redirect specific files to https</a> appeared first on <a rel="nofollow" href="http://tech.yipp.ca">Techy Things</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://tech.yipp.ca/nginx/nginx-rewrite-rules-to-redirect-specific-files-to-https/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
