<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Running Mercurial with FastCGI in nginx</title>
	<atom:link href="http://www.dikant.de/2009/07/29/running-mercurial-with-fastcgi-in-nginx/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dikant.de/2009/07/29/running-mercurial-with-fastcgi-in-nginx/</link>
	<description>Personal blog of Peter Dikant</description>
	<lastBuildDate>Sat, 04 Feb 2012 13:19:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Mathias</title>
		<link>http://www.dikant.de/2009/07/29/running-mercurial-with-fastcgi-in-nginx/comment-page-1/#comment-17348</link>
		<dc:creator>Mathias</dc:creator>
		<pubDate>Thu, 09 Jun 2011 23:05:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.dikant.de/?p=88#comment-17348</guid>
		<description>Thanks a lot for the fail2ban filter :)</description>
		<content:encoded><![CDATA[<p>Thanks a lot for the fail2ban filter <img src='http://www.dikant.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.dikant.de/2009/07/29/running-mercurial-with-fastcgi-in-nginx/comment-page-1/#comment-14791</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Mon, 24 Jan 2011 10:01:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.dikant.de/?p=88#comment-14791</guid>
		<description>Hi Curtis, unfortunately I don&#039;t have a solution for this problem. I also tried to get the limit_except approach working, but without success. I don&#039;t need public access to my repository, so I did not investigate further.</description>
		<content:encoded><![CDATA[<p>Hi Curtis, unfortunately I don&#8217;t have a solution for this problem. I also tried to get the limit_except approach working, but without success. I don&#8217;t need public access to my repository, so I did not investigate further.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Curtis Jewell</title>
		<link>http://www.dikant.de/2009/07/29/running-mercurial-with-fastcgi-in-nginx/comment-page-1/#comment-14790</link>
		<dc:creator>Curtis Jewell</dc:creator>
		<pubDate>Mon, 24 Jan 2011 09:49:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.dikant.de/?p=88#comment-14790</guid>
		<description>Thanks for the how-to! Got things up and running.  One question: How do you do public access to the repository while restricting pushes? The problem is illustrated in the nginx config below: 

&lt;code&gt;
server {
    listen                xx.xxx.xxx.xxx:443;
    server_name           hg.curtisjewell.name;
    server_name           hg;
    ssl                   on;
    ssl_certificate       /.../hg.chained.crt;
    ssl_certificate_key   /.../hg.key;
    access_log            /.../hg.log;

    keepalive_timeout     70;
    
    location / {
        fastcgi_pass      127.0.0.1:xxxxx;

       fastcgi_param      PATH_INFO	         $fastcgi_script_name;
       fastcgi_param      QUERY_STRING	     $query_string;
       fastcgi_param      REQUEST_METHOD     $request_method;

       fastcgi_param      CONTENT_TYPE	     $content_type;
       fastcgi_param      CONTENT_LENGTH     $content_length;
       fastcgi_param      SERVER_PROTOCOL	 $server_protocol;
       fastcgi_param      SERVER_PORT         $server_port;
       fastcgi_param      SERVER_NAME         $server_name;

        fastcgi_param     GATEWAY_INTERFACE  CGI/1.1;
        fastcgi_param     SERVER_SOFTWARE    nginx/$nginx_version;
        
        fastcgi_param     REMOTE_ADDR        $remote_addr;
        fastcgi_param     REMOTE_PORT        $remote_port;
        fastcgi_param     REMOTE_USER        $remote_user;     

# The commented lines, when commented, make pushing return a 401 because the user is not passed to hgweb.
#        limit_except GET { # do this for all requests but GET requests
            auth_basic           &quot;Mercurial repositories on curtisjewell.name&quot;;
            auth_basic_user_file /var/hg/hgusers_basic;
#        }
    }
}
&lt;/code&gt;

Mercurial 1.4.3, nginx 0.7.65, by the way.</description>
		<content:encoded><![CDATA[<p>Thanks for the how-to! Got things up and running.  One question: How do you do public access to the repository while restricting pushes? The problem is illustrated in the nginx config below: </p>
<p><code><br />
server {<br />
    listen                xx.xxx.xxx.xxx:443;<br />
    server_name           hg.curtisjewell.name;<br />
    server_name           hg;<br />
    ssl                   on;<br />
    ssl_certificate       /.../hg.chained.crt;<br />
    ssl_certificate_key   /.../hg.key;<br />
    access_log            /.../hg.log;</p>
<p>    keepalive_timeout     70;</p>
<p>    location / {<br />
        fastcgi_pass      127.0.0.1:xxxxx;</p>
<p>       fastcgi_param      PATH_INFO	         $fastcgi_script_name;<br />
       fastcgi_param      QUERY_STRING	     $query_string;<br />
       fastcgi_param      REQUEST_METHOD     $request_method;</p>
<p>       fastcgi_param      CONTENT_TYPE	     $content_type;<br />
       fastcgi_param      CONTENT_LENGTH     $content_length;<br />
       fastcgi_param      SERVER_PROTOCOL	 $server_protocol;<br />
       fastcgi_param      SERVER_PORT         $server_port;<br />
       fastcgi_param      SERVER_NAME         $server_name;</p>
<p>        fastcgi_param     GATEWAY_INTERFACE  CGI/1.1;<br />
        fastcgi_param     SERVER_SOFTWARE    nginx/$nginx_version;</p>
<p>        fastcgi_param     REMOTE_ADDR        $remote_addr;<br />
        fastcgi_param     REMOTE_PORT        $remote_port;<br />
        fastcgi_param     REMOTE_USER        $remote_user;     </p>
<p># The commented lines, when commented, make pushing return a 401 because the user is not passed to hgweb.<br />
#        limit_except GET { # do this for all requests but GET requests<br />
            auth_basic           "Mercurial repositories on curtisjewell.name";<br />
            auth_basic_user_file /var/hg/hgusers_basic;<br />
#        }<br />
    }<br />
}<br />
</code></p>
<p>Mercurial 1.4.3, nginx 0.7.65, by the way.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wumzi</title>
		<link>http://www.dikant.de/2009/07/29/running-mercurial-with-fastcgi-in-nginx/comment-page-1/#comment-12268</link>
		<dc:creator>wumzi</dc:creator>
		<pubDate>Wed, 21 Jul 2010 15:10:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.dikant.de/?p=88#comment-12268</guid>
		<description>Great how-to !

Thanks !</description>
		<content:encoded><![CDATA[<p>Great how-to !</p>
<p>Thanks !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.dikant.de/2009/07/29/running-mercurial-with-fastcgi-in-nginx/comment-page-1/#comment-8184</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Sat, 17 Oct 2009 08:24:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.dikant.de/?p=88#comment-8184</guid>
		<description>You are right. Thanks for pointing out the error!

I updated the posting.</description>
		<content:encoded><![CDATA[<p>You are right. Thanks for pointing out the error!</p>
<p>I updated the posting.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: seth</title>
		<link>http://www.dikant.de/2009/07/29/running-mercurial-with-fastcgi-in-nginx/comment-page-1/#comment-8173</link>
		<dc:creator>seth</dc:creator>
		<pubDate>Sat, 17 Oct 2009 02:12:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.dikant.de/?p=88#comment-8173</guid>
		<description>To answer my own problem.

The executable bit needs to be set on hgwebdir.fcgi
(chmod +x hgwebdir.fcgi)

Otherwise we get:
spawn-fcgi: child exited with: 2

Also (I could be incorrect), but instead of:
chmod -R www-data.www-data /tmp/hgtest

I think it was meant to be:
chown -R www-data.www-data /tmp/hgtest

Thanks for the great post!</description>
		<content:encoded><![CDATA[<p>To answer my own problem.</p>
<p>The executable bit needs to be set on hgwebdir.fcgi<br />
(chmod +x hgwebdir.fcgi)</p>
<p>Otherwise we get:<br />
spawn-fcgi: child exited with: 2</p>
<p>Also (I could be incorrect), but instead of:<br />
chmod -R www-data.www-data /tmp/hgtest</p>
<p>I think it was meant to be:<br />
chown -R www-data.www-data /tmp/hgtest</p>
<p>Thanks for the great post!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: seth</title>
		<link>http://www.dikant.de/2009/07/29/running-mercurial-with-fastcgi-in-nginx/comment-page-1/#comment-8171</link>
		<dc:creator>seth</dc:creator>
		<pubDate>Fri, 16 Oct 2009 23:06:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.dikant.de/?p=88#comment-8171</guid>
		<description>After running 

spawn-fcgi -a 127.0.0.1 -p 9001 -u www-data -g www-data -f /tmp/hgwebdir.fcgi -P /var/run/fastcgi-mercurial.pid -C 1

I get the following

spawn-fcgi: child exited with: 2

Any thoughts?</description>
		<content:encoded><![CDATA[<p>After running </p>
<p>spawn-fcgi -a 127.0.0.1 -p 9001 -u www-data -g www-data -f /tmp/hgwebdir.fcgi -P /var/run/fastcgi-mercurial.pid -C 1</p>
<p>I get the following</p>
<p>spawn-fcgi: child exited with: 2</p>
<p>Any thoughts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Papenbrock</title>
		<link>http://www.dikant.de/2009/07/29/running-mercurial-with-fastcgi-in-nginx/comment-page-1/#comment-7365</link>
		<dc:creator>Michael Papenbrock</dc:creator>
		<pubDate>Tue, 15 Sep 2009 09:01:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.dikant.de/?p=88#comment-7365</guid>
		<description>It&#039;s running!!! Thank you very much!</description>
		<content:encoded><![CDATA[<p>It&#8217;s running!!! Thank you very much!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://www.dikant.de/2009/07/29/running-mercurial-with-fastcgi-in-nginx/comment-page-1/#comment-7339</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Mon, 14 Sep 2009 14:58:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.dikant.de/?p=88#comment-7339</guid>
		<description>Thanks, I forgot to mention this modification in my howto. The posting is now updated.</description>
		<content:encoded><![CDATA[<p>Thanks, I forgot to mention this modification in my howto. The posting is now updated.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Markus Papenbrock</title>
		<link>http://www.dikant.de/2009/07/29/running-mercurial-with-fastcgi-in-nginx/comment-page-1/#comment-7338</link>
		<dc:creator>Markus Papenbrock</dc:creator>
		<pubDate>Mon, 14 Sep 2009 14:53:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.dikant.de/?p=88#comment-7338</guid>
		<description>I ran into problems where an empty repository list was shown.
To solve this, you have to edit the file /tmp/hgwebdir.fcgi
Replace this line at the bottom:
&lt;code&gt;WSGIServer(hgwebdir(&#039;hgweb.config&#039;)).run()&lt;/code&gt;
with a direct reference to the hgweb.config file:
&lt;code&gt;WSGIServer(hgwebdir(&#039;/tmp/hgweb.config&#039;)).run()&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>I ran into problems where an empty repository list was shown.<br />
To solve this, you have to edit the file /tmp/hgwebdir.fcgi<br />
Replace this line at the bottom:<br />
<code>WSGIServer(hgwebdir('hgweb.config')).run()</code><br />
with a direct reference to the hgweb.config file:<br />
<code>WSGIServer(hgwebdir('/tmp/hgweb.config')).run()</code></p>
]]></content:encoded>
	</item>
</channel>
</rss>

