<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://wiki.nginx.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.nginx.org/index.php?title=HttpUwsgiModule&amp;feed=atom&amp;action=history</id>
		<title>HttpUwsgiModule - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.nginx.org/index.php?title=HttpUwsgiModule&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://wiki.nginx.org/index.php?title=HttpUwsgiModule&amp;action=history"/>
		<updated>2013-05-23T01:21:31Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.0</generator>

	<entry>
		<id>http://wiki.nginx.org/index.php?title=HttpUwsgiModule&amp;diff=3641&amp;oldid=prev</id>
		<title>Qqq1243: add uwsgi_cache_key on caching example</title>
		<link rel="alternate" type="text/html" href="http://wiki.nginx.org/index.php?title=HttpUwsgiModule&amp;diff=3641&amp;oldid=prev"/>
				<updated>2013-04-03T14:02:14Z</updated>
		
		<summary type="html">&lt;p&gt;add uwsgi_cache_key on caching example&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 14:02, 3 April 2013&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 24:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; server {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; server {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; location / {&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; location / {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; uwsgi_pass &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160;  &lt;/del&gt;unix:/var/run/example.com.sock;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; uwsgi_pass &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160;  &lt;/ins&gt;unix:/var/run/example.com.sock;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; uwsgi_cache &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &lt;/del&gt;NAME;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; uwsgi_cache &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &lt;/ins&gt;NAME&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;#160; &amp;#160; &amp;#160; uwsgi_cache_key&amp;#160; &amp;#160;  $host$request_uri&lt;/ins&gt;;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; uwsgi_cache_valid&amp;#160;  200 302&amp;#160; 1h;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; uwsgi_cache_valid&amp;#160;  200 302&amp;#160; 1h;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; uwsgi_cache_valid&amp;#160;  301&amp;#160; &amp;#160; &amp;#160; 1d;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; uwsgi_cache_valid&amp;#160;  301&amp;#160; &amp;#160; &amp;#160; 1d;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Qqq1243</name></author>	</entry>

	<entry>
		<id>http://wiki.nginx.org/index.php?title=HttpUwsgiModule&amp;diff=2499&amp;oldid=prev</id>
		<title>WGH: [emerg] invalid value &quot;no&quot; in &quot;uwsgi_buffering&quot; directive, it must be &quot;on&quot; or &quot;off&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.nginx.org/index.php?title=HttpUwsgiModule&amp;diff=2499&amp;oldid=prev"/>
				<updated>2012-07-22T20:42:49Z</updated>
		
		<summary type="html">&lt;p&gt;[emerg] invalid value &amp;quot;no&amp;quot; in &amp;quot;uwsgi_buffering&amp;quot; directive, it must be &amp;quot;on&amp;quot; or &amp;quot;off&amp;quot;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 20:42, 22 July 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 68:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 68:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== uwsgi_buffering ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== uwsgi_buffering ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''syntax:''' uwsgi_buffering ''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;yes &lt;/del&gt;| &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;no&lt;/del&gt;''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''syntax:''' uwsgi_buffering ''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;on &lt;/ins&gt;| &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;off&lt;/ins&gt;''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''default:''' uwsgi_buffering ''&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;yes&lt;/del&gt;''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''default:''' uwsgi_buffering ''&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;on&lt;/ins&gt;''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''context:''' ''http, server, location''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''context:''' ''http, server, location''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>WGH</name></author>	</entry>

	<entry>
		<id>http://wiki.nginx.org/index.php?title=HttpUwsgiModule&amp;diff=2349&amp;oldid=prev</id>
		<title>Andyvlx: /* Directives */</title>
		<link rel="alternate" type="text/html" href="http://wiki.nginx.org/index.php?title=HttpUwsgiModule&amp;diff=2349&amp;oldid=prev"/>
				<updated>2012-06-15T14:03:03Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Directives&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr valign='top'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 14:03, 15 June 2012&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 150:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 150:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;uwsgi_cache_key localhost:9000$request_uri; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;uwsgi_cache_key localhost:9000$request_uri; &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/geshi&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/geshi&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;== uwsgi_cache_lock ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'''syntax:''' ''uwsgi_cache_lock on|off''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'''default:''' ''off''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'''context:''' ''http, server, location''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;When enabled, only one request at a time will be allowed to populate a new cache element identified according to the uwsgi_cache_key directive by passing a request to a uWSGI server. Other requests of the same cache element will either wait for a response to appear in the cache, or the cache lock for this element to be released, up to the time set by the uwsgi_cache_lock_timeout directive. This directive appeared in version 1.1.12.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;== uwsgi_cache_lock_timeout ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'''syntax:''' ''uwsgi_cache_lock time''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'''default:''' ''5s''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'''context:''' ''http, server, location''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Sets a timeout for fastcgi_cache_lock. This directive appeared in version 1.1.12.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== uwsgi_cache_methods ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== uwsgi_cache_methods ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Andyvlx</name></author>	</entry>

	<entry>
		<id>http://wiki.nginx.org/index.php?title=HttpUwsgiModule&amp;diff=534&amp;oldid=prev</id>
		<title>Kolbyjack: Copy/paste error</title>
		<link rel="alternate" type="text/html" href="http://wiki.nginx.org/index.php?title=HttpUwsgiModule&amp;diff=534&amp;oldid=prev"/>
				<updated>2011-10-06T11:58:19Z</updated>
		
		<summary type="html">&lt;p&gt;Copy/paste error&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Synopsis =&lt;br /&gt;
This module allows Nginx to interact with uWSGI processes and control what parameters are passed to the process.&lt;br /&gt;
This page was mostly copied from the SCGI documentation, and may not be entirely accurate as a result.&lt;br /&gt;
&lt;br /&gt;
''Do not confuse the uwsgi protocol with the uWSGI server (that speaks the uwsgi protocol)''&lt;br /&gt;
&lt;br /&gt;
This module first appeared in nginx-0.8.40&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
location / {&lt;br /&gt;
  include uwsgi_params;&lt;br /&gt;
  uwsgi_pass unix:/var/run/example.com.sock;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Caching example:&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
http {&lt;br /&gt;
  uwsgi_cache_path   /path/to/cache  levels=1:2&lt;br /&gt;
                       keys_zone=NAME:10m&lt;br /&gt;
                       inactive=5m;&lt;br /&gt;
&lt;br /&gt;
  server {&lt;br /&gt;
    location / {&lt;br /&gt;
      uwsgi_pass    unix:/var/run/example.com.sock;&lt;br /&gt;
      uwsgi_cache   NAME;&lt;br /&gt;
      uwsgi_cache_valid   200 302  1h;&lt;br /&gt;
      uwsgi_cache_valid   301      1d;&lt;br /&gt;
      uwsgi_cache_valid   any      1m;&lt;br /&gt;
      uwsgi_cache_min_uses  1;&lt;br /&gt;
      uwsgi_cache_use_stale error  timeout invalid_header http_500;&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The cache honors backend's Cache-Control, Expires, and etc.  Vary handling is not implemented.&lt;br /&gt;
&lt;br /&gt;
= Directives =&lt;br /&gt;
== uwsgi_bind ==&lt;br /&gt;
'''syntax:''' ''uwsgi_bind address''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''none''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
'''example:'''&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
uwsgi_bind  192.168.1.1;&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Binds each upstream connection to a local address before calling connect().  It may be useful if host has several interfaces/aliases and you want to pass outgoing connections from specific interface/address.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_buffer_size ==&lt;br /&gt;
'''syntax:''' ''uwsgi_buffer_size the_size''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''uwsgi_buffer_size 4k/8k''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
This directive sets the buffersize, into which will be read the first part of the response, obtained from the uwsgi server.&lt;br /&gt;
&lt;br /&gt;
In this part of response the small response-header is located, as a rule.&lt;br /&gt;
&lt;br /&gt;
By default, the buffer size is equal to the size of one buffer in directive [[#uwsgi_buffers|uwsgi_buffers]], however it is possible to set it to less.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_buffering ==&lt;br /&gt;
&lt;br /&gt;
'''syntax:''' uwsgi_buffering ''yes | no''&lt;br /&gt;
&lt;br /&gt;
'''default:''' uwsgi_buffering ''yes''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
'''version:''' ''1.1.5''&lt;br /&gt;
&lt;br /&gt;
'''variables:''' ''no''&lt;br /&gt;
&lt;br /&gt;
This directive controls response buffering of the response.&lt;br /&gt;
&lt;br /&gt;
If buffering is activated, then nginx reads the response from the upstream server as fast as possible, saving it in the buffer as configured by directives [[#uwsgi_buffer_size|uwsgi_buffer_size]] and [[#uwsgi_buffers|uwsgi_buffers]]. If the response does not fit into memory, then parts of it will be written to disk.&lt;br /&gt;
&lt;br /&gt;
If buffering is switched off, then the response is synchronously transferred to client immediately as it is received. nginx does not attempt to read the entire answer from the upstream server, the maximum size of data which nginx can accept from the server is set by directive [[#uwsgi_buffer_size|uwsgi_buffer_size]].&lt;br /&gt;
&lt;br /&gt;
For Comet applications based on long-polling it is important to set uwsgi_buffering to off, otherwise the asynchronous response is buffered and the Comet does not work.&lt;br /&gt;
&lt;br /&gt;
Buffering can be set on a per-request basis by setting the X-Accel-Buffering header in the response.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_buffers ==&lt;br /&gt;
'''syntax:''' ''uwsgi_buffers the_number is_size''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''uwsgi_buffers 8 4k/8k''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
This directive sets the number and the size of buffers, into which will be read the answer, obtained from the uwsgi server.&lt;br /&gt;
By default, the size of one buffer is equal to the size of page. Depending on platform this is either 4K, 8K or 16K.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_busy_buffers_size ==&lt;br /&gt;
'''syntax:''' ''uwsgi_busy_buffers_size size''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''uwsgi_busy_buffers_size [&amp;quot;#uwsgi_buffer_size&amp;quot;] * 2''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location, if''&lt;br /&gt;
&lt;br /&gt;
''Undocumented''&lt;br /&gt;
&lt;br /&gt;
== uwsgi_cache ==&lt;br /&gt;
'''syntax:''' ''uwsgi_cache zone|off''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''off''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
The directive specifies the area which actually is the share memory's name for caching. The same area can be used in several places.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_cache_bypass ==&lt;br /&gt;
'''syntax:''' ''uwsgi_cache_bypass variable1 variable2...''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''none''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
'''version:''' ''&amp;gt;= 0.8.46''&lt;br /&gt;
&lt;br /&gt;
Specifies in what cases a request will bypass a cached response and pass the request to upstream.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
uwsgi_cache_bypass $cookie_nocache  $arg_nocache$arg_comment;&lt;br /&gt;
uwsgi_cache_bypass $http_pragma     $http_authorization;&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expression is false if it is equal to the empty string or &amp;quot;0&amp;quot;. For instance, in the above example, the request will always go through to the back-end if the cookie &amp;quot;nocache&amp;quot; is set in the request.&lt;br /&gt;
&lt;br /&gt;
Note that the response from the back-end is still eligible for caching. Thus one way of refreshing an item in the cache is sending a request with a header you pick yourself, e.g. &amp;quot;My-Secret-Header: 1&amp;quot;, then having a '''uwsgi_no_cache''' line like:&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
uwsgi_no_cache $http_my_secret_header;&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== uwsgi_cache_key ==&lt;br /&gt;
'''syntax:''' ''uwsgi_cache_key line''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''none''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
The directive sets the key for caching, for example:&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
uwsgi_cache_key localhost:9000$request_uri; &lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== uwsgi_cache_methods ==&lt;br /&gt;
'''syntax:''' ''uwsgi_cache_methods [GET HEAD POST]''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''uwsgi_cache_methods GET HEAD''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
GET/HEAD is syntax sugar, i.e. you can not disable GET/HEAD even if you set just&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
uwsgi_cache_methods POST;&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== uwsgi_cache_min_uses ==&lt;br /&gt;
'''syntax:''' ''uwsgi_cache_min_uses the_number''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''uwsgi_cache_min_uses 1''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
Directive specifies after how many requests to the same URL in will be cached.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_cache_path ==&lt;br /&gt;
'''syntax:''' ''uwsgi_cache_path path [levels=m:n] keys_zone=name:size [inactive=time] [max_size=size]''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''none''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http''&lt;br /&gt;
&lt;br /&gt;
The ''clean_time'' parameter was removed in 0.7.45.&lt;br /&gt;
&lt;br /&gt;
This directive specifies path to the cache storage and other cache parameters. All data is stored in the files. The cache key and the name of cache file are calculated as MD5 sum of the proxied URL.&lt;br /&gt;
&lt;br /&gt;
Level parameter sets number and width of the names of subdirectories used to store caching files. For example, with the directive like:&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
uwsgi_cache_path  /data/nginx/cache  levels=1:2   keys_zone=one:10m;&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
the data will be stored in the following file:&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
/data/nginx/cache/c/29/b7f54b2df7773722d382f4809d65029c&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Caching data is first written to the temporary file which is then moved to the final location in a cache directory. Starting from 0.8.9 it is possible to store temporary and cache files on different file systems, but it should be kept in mind that in such a case instead of cheap and atomic rename syscall a full file copy is performed. So it's better to use the same file system in both parameters of [[#uwsgi_temp_path|uwsgi_temp_path]] and &amp;lt;code&amp;gt;uwsgi_cache_path&amp;lt;/code&amp;gt; directives.&lt;br /&gt;
&lt;br /&gt;
In addition, all active keys and information about data are kept in the shared memory zone, which name and size are specified by the options of the &amp;lt;code&amp;gt;key_zone&amp;lt;/code&amp;gt; parameter. In case this data haven't been accessed for the time, specified in the option of &amp;lt;code&amp;gt;inactive&amp;lt;/code&amp;gt; parameter, it is wiped out from the memory. By default inactive period is set to 10 minutes.&lt;br /&gt;
&lt;br /&gt;
To maintain the maximum size of the cache, which is set by &amp;lt;code&amp;gt;max_size&amp;lt;/code&amp;gt; parameter, a special process '''cache manager''' periodically deletes old data from the cache.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_cache_use_stale ==&lt;br /&gt;
'''syntax:''' ''uwsgi_cache_use_stale updating|error|timeout|invalid_header|http_500''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''uwsgi_cache_use_stale off''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
Determines whether or not Nginx will serve stale cached data in case of gateway event such as error, timeout etc.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_cache_valid ==&lt;br /&gt;
'''syntax:''' ''uwsgi_cache_valid [http_return_code [...]] time''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''none''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
Directive sets caching period for the specified http return codes. For example:&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
uwsgi_cache_valid  200 302  10m;&lt;br /&gt;
uwsgi_cache_valid  404      1m;&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
sets caching period of 10 minutes for return codes 200 and 302 and 1 minute for the 404 code.&lt;br /&gt;
&lt;br /&gt;
In case only caching period is specified:&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
uwsgi_cache_valid  5m;&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
the default behavior is to cache only replies with the codes 200, 301 and 302.&lt;br /&gt;
&lt;br /&gt;
It's also possible to cache all the replies by specifying code &amp;quot;any&amp;quot;:&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt; &lt;br /&gt;
uwsgi_cache_valid  200 302 10m;&lt;br /&gt;
uwsgi_cache_valid  301 1h;&lt;br /&gt;
uwsgi_cache_valid  any 1m;&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== uwsgi_connect_timeout ==&lt;br /&gt;
'''syntax:''' ''uwsgi_connect_timeout time''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''uwsgi_connect_timeout 60''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
Directive sets timeout period for connection with uWSGI-server. It should be noted that this value can't exceed 75 seconds.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_hide_header ==&lt;br /&gt;
'''syntax:''' ''uwsgi_hide_header name''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
By default, Nginx does not pass &amp;quot;X-Accel-...&amp;quot; headers from the uWSGI process back to the client. This directive can be used to hide other headers as well.&lt;br /&gt;
&lt;br /&gt;
If the &amp;quot;X-Accel-...&amp;quot; headers must be provided, then it is necessary to use directive [[#uwsgi_pass_header|uwsgi_pass_header]] to force them to be returned to the client.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_ignore_client_abort ==&lt;br /&gt;
'''syntax:''' ''uwsgi_ignore_client_abort on|off''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''uwsgi_ignore_client_abort off''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
This directive determines if current request to the uWSGI-server must be aborted in case the client aborts the request to the server.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_ignore_headers ==&lt;br /&gt;
'''syntax:''' ''uwsgi_ignore_headers name [name...]''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
This directive forbids processing of the named headers from the uWSGI-server reply. It is possible to specify headers like &amp;quot;X-Accel-Redirect&amp;quot;, &amp;quot;X-Accel-Expires&amp;quot;, &amp;quot;Expires&amp;quot; or &amp;quot;Cache-Control&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_intercept_errors ==&lt;br /&gt;
'''syntax:''' ''uwsgi_intercept_errors on|off''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''uwsgi_intercept_errors off''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
This directive determines whether or not to transfer 4xx and 5xx errors back to the client or to allow Nginx to answer with directive error_page.&lt;br /&gt;
&lt;br /&gt;
Note: You need to explicitly define the error_page handler for this for it to be useful. As Igor says, &amp;quot;nginx does not intercept an error if there is no custom handler for it it does not show its default pages. This allows to intercept some errors, while passing others as are.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== uwsgi_max_temp_file_size ==&lt;br /&gt;
'''syntax:''' ''uwsgi_max_temp_file_size 0''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''?''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''?''&lt;br /&gt;
&lt;br /&gt;
This directive turns off uwsgi buffering according to the source code.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_modifier1 ==&lt;br /&gt;
'''syntax:''' ''uwsgi_modifier1 value''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''0''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''server, location''&lt;br /&gt;
&lt;br /&gt;
Set the first modifier for a uwsgi request (the default is a WSGI request)&lt;br /&gt;
&lt;br /&gt;
== uwsgi_modifier2 ==&lt;br /&gt;
'''syntax:''' ''uwsgi_modifier2 value''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''0''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''server, location''&lt;br /&gt;
&lt;br /&gt;
Set the second modifier for a uwsgi request&lt;br /&gt;
&lt;br /&gt;
== uwsgi_next_upstream ==&lt;br /&gt;
'''syntax:''' ''uwsgi_next_upstream error|timeout|invalid_header|http_500|http_503|http_404|off''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''uwsgi_next_upstream error timeout''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
This directive defines in which cases request will be passed to the next server:&lt;br /&gt;
&lt;br /&gt;
* error — an error occurred during connection to the server, passing request to it or reading server respond header;&lt;br /&gt;
* timeout — a timeout occurred during connection to the server, passing request to it or reading server respond header;&lt;br /&gt;
* invalid_header — server returned empty or invalid answer;&lt;br /&gt;
* http_500 — server returned 500 respond;&lt;br /&gt;
* http_503 — server returned 503 respond;&lt;br /&gt;
* http_404 — server returned 404 respond;&lt;br /&gt;
* updating — ''?''&lt;br /&gt;
* off — explicitly forbids passing request to the next server;&lt;br /&gt;
&lt;br /&gt;
It should be clear that passing request to the next server is possible only if no data have been yet returned to the client. So, if the error or timeout occurred during the data transmission to the client it's too late to fix it.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_no_cache ==&lt;br /&gt;
'''syntax:''' ''uwsgi_no_cache variable [...]''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''none''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
Specifies in what cases the responses will not be stored, e.g.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
uwsgi_no_cache $cookie_nocache  $arg_nocache$arg_comment;&lt;br /&gt;
uwsgi_no_cache $http_pragma     $http_authorization;&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The expression is false if it is equal to the empty string or &amp;quot;0&amp;quot;. For instance, in the above example, the response will not be stored if the cookie &amp;quot;nocache&amp;quot; is set in the request.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_param ==&lt;br /&gt;
'''syntax:''' ''uwsgi_param parameter value''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''none''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
Directive assigns the parameter, which will be transferred to the uWSGI-server. &lt;br /&gt;
&lt;br /&gt;
It is possible to use strings, variables and their combination as values. Directives not set are inherited from the outer level. Directives set in current level clear any previously defined directives for the current level.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_pass ==&lt;br /&gt;
'''syntax:''' ''uwsgi_pass uwsgi-server''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''none''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''location, if in location''&lt;br /&gt;
&lt;br /&gt;
Directive assigns the port or socket on which the uWSGI-server is listening. Port can be indicated by itself or as an address and port, for example:&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
  uwsgi_pass   localhost:9000;&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
using a Unix domain socket:&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
  uwsgi_pass   unix:/tmp/uwsgi.socket;&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You may also use an upstream block.&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
upstream backend  {&lt;br /&gt;
  server 127.0.0.1:1234;&lt;br /&gt;
  server unix:/var/run/example.com.sock;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
uwsgi_pass   backend;&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== uwsgi_pass_header ==&lt;br /&gt;
'''syntax:''' ''uwsgi_pass_header name''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
This directive explicitly allows to pass named headers to the client.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_pass_request_body ==&lt;br /&gt;
'''syntax:''' ''uwsgi_pass_request_body on|off''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''uwsgi_pass_request_body on''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
Defines whether or not the request body should be passed to the uwsgi.&lt;br /&gt;
Should usually be left on.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_pass_request_headers ==&lt;br /&gt;
'''syntax:''' ''uwsgi_pass_request_headers on|off''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''uwsgi_pass_request_headers on''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
Defines whether or not the request headers should be passed to the uwsgi.&lt;br /&gt;
Should usually be left on.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_read_timeout ==&lt;br /&gt;
'''syntax:''' ''uwsgi_read_timeout time''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''uwsgi_read_timeout 60''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
Directive sets the amount of time for upstream to wait for a uwsgi process to send response data. Change this directive if you have long running uwsgi processes that do not produce output until they are finished processing. If you are seeing an upstream timed out error in the error log, then increase this parameter to something more appropriate.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_send_timeout ==&lt;br /&gt;
'''syntax:''' ''uwsgi_send_timeout time''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''uwsgi_send_timeout 60''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
Directive specifies the timeout when sending the request to uwsgi. The timeout is calculated between two write operations, not for the whole request. If no data has been written during this period then nginx closes the connection.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_store ==&lt;br /&gt;
'''syntax:''' ''uwsgi_store on|off|path''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''uwsgi_store off''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
This directive sets the path in which upstream files are stored. The parameter &amp;quot;on&amp;quot; preserves files in accordance with path specified in directives ''alias'' or ''root''. The parameter &amp;quot;off&amp;quot; forbids storing. Furthermore, the name of the path can be clearly assigned with the aid of the line with the variables:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
uwsgi_store   /data/www$original_uri;&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The time of modification for the file will be set to the date of &amp;quot;Last-Modified&amp;quot; header in the response. To be able to safe files in this directory it is necessary that the path is under the directory with temporary files, given by directive [[#uwsgi_temp_path|uwsgi_temp_path]] for the data location.&lt;br /&gt;
&lt;br /&gt;
This directive can be used for creating the local copies for dynamic output of the backend which is not very often changed, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
location /images/ {&lt;br /&gt;
  root                /data/www;&lt;br /&gt;
  error_page          404 = /fetch$uri;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
location /fetch {&lt;br /&gt;
  internal;&lt;br /&gt;
&lt;br /&gt;
  uwsgi_pass           backend;&lt;br /&gt;
  uwsgi_store          on;&lt;br /&gt;
  uwsgi_store_access   user:rw  group:rw  all:r;&lt;br /&gt;
  uwsgi_temp_path      /data/temp;&lt;br /&gt;
&lt;br /&gt;
  alias               /data/www;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To be clear uwsgi_store is not a cache, it's rather mirror on demand.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_store_access ==&lt;br /&gt;
'''syntax:''' ''uwsgi_store_access users:permissions [users:permission ...] ''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''uwsgi_store_access user:rw''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
This directive assigns the permissions for the created files and directories, for example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
uwsgi_store_access  user:rw  group:rw  all:r;&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If any rights for groups or all are assigned, then it is not necessary to assign rights for user:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
uwsgi_store_access  group:rw  all:r;&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== uwsgi_string ==&lt;br /&gt;
'''syntax:''' ''uwsgi_string string''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''none''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''server, location''&lt;br /&gt;
&lt;br /&gt;
append a string to a uwsgi request&lt;br /&gt;
&lt;br /&gt;
Example (for a uwsgi compatible server that support the '''eval modifier''' as uWSGI)&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
  location / {&lt;br /&gt;
    uwsgi_pass unix:/var/run/example.com.sock;&lt;br /&gt;
    uwsgi_pass_request_headers off;&lt;br /&gt;
    uwsgi_pass_request_body off;&lt;br /&gt;
    uwsgi_string &amp;quot;&lt;br /&gt;
&lt;br /&gt;
import uwsgi&lt;br /&gt;
&lt;br /&gt;
uwsgi.start_response('200 OK', [('Content-type','text/plain')])&lt;br /&gt;
total = 30+22&lt;br /&gt;
uwsgi.send(&amp;quot;30 + 22 = %d&amp;quot; % total)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
    uwsgi_modifier1 22;&lt;br /&gt;
    uwsgi_modifier2 0;&lt;br /&gt;
&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== uwsgi_temp_file_write_size ==&lt;br /&gt;
'''syntax:''' ''uwsgi_temp_file_write_size size''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''uwsgi_temp_file_write_size [&amp;quot;#uwsgi_buffer_size&amp;quot;] * 2''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location, if''&lt;br /&gt;
&lt;br /&gt;
Sets the amount of data that will be flushed to the uwsgi_temp_path when writing. It may be used to prevent a worker process blocking for too long while spooling data.&lt;br /&gt;
&lt;br /&gt;
== uwsgi_temp_path ==&lt;br /&gt;
'''syntax:''' ''uwsgi_temp_path path [level1 [level2 [level3]]]''&lt;br /&gt;
&lt;br /&gt;
'''default:''' ''uwsgi_temp_path uwsgi_temp''&lt;br /&gt;
&lt;br /&gt;
'''context:''' ''http, server, location''&lt;br /&gt;
&lt;br /&gt;
This directive sets the path where to store temporary files received from another server. It is possible to use up to 3 levels of subdirectories to create hashed storage. Level value specifies how many symbols will be used for hashing. For example, in the following configuration:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
uwsgi_temp_path  /spool/nginx/uwsgi_temp 1 2;&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Temporary file name may look like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;nginx&amp;quot;&amp;gt;&lt;br /&gt;
/spool/nginx/uwsgi_temp/7/45/00000123457&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Parameters transferred to uWSGI-server. =&lt;br /&gt;
&lt;br /&gt;
The request headers are transferred to the uWSGI-server in the form of parameters. In the applications and the scripts run from the uWSGI-server, these parameters are usually accessible in the form of environment variables. For example, the header &amp;quot;User-agent&amp;quot; is transferred as parameter HTTP_USER_AGENT. Besides the headers of the HTTP request, it is possible to transfer arbitrary parameters with the aid of directive uwsgi_param. &lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
* [http://projects.unbit.it/uwsgi/wiki uWSGI Project]&lt;br /&gt;
* [http://projects.unbit.it/uwsgi/wiki/RunOnNginx nginx page on uWSGI wiki]&lt;br /&gt;
* [http://www.westphahl.net/blog/2010/4/8/running-django-nginx-and-uwsgi/ Simon Westphahl's blog]&lt;br /&gt;
* [[NginxHttpFcgiModule|SCGI Module]]&lt;br /&gt;
&lt;br /&gt;
= Links =&lt;br /&gt;
* [[HttpUwsgiModuleMultipleDynamicApplications|Multiple uWSGI apps from a single upstream]]&lt;/div&gt;</summary>
		<author><name>Kolbyjack</name></author>	</entry>

	</feed>