

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
18 messages in ru.sysoev.nginxRe: Running Mercurial using Nginx as ...| From | Sent On | Attachments |
|---|---|---|
| Thomas | Jan 26, 2008 9:26 am | |
| Cliff Wells | Jan 26, 2008 11:14 am | |
| Adrian Perez | Jan 27, 2008 5:29 pm | |
| Thomas | Jan 29, 2008 2:58 am | |
| Marcin Kasperski | Jan 29, 2008 3:49 am | |
| Thomas | Jan 29, 2008 1:11 pm | |
| eliott | Jan 29, 2008 1:27 pm | |
| Thomas | Jan 29, 2008 1:34 pm | |
| Thomas | Jan 29, 2008 2:03 pm | |
| Manlio Perillo | Jan 29, 2008 2:30 pm | |
| Thomas | Jan 29, 2008 2:47 pm | |
| Thomas | Jan 29, 2008 3:23 pm | |
| Thomas | Jan 30, 2008 4:57 am | |
| Manlio Perillo | Jan 30, 2008 5:47 am | |
| Thomas | Jan 30, 2008 6:01 am | |
| Thomas | Jan 30, 2008 6:33 am | |
| Manlio Perillo | Jan 30, 2008 7:16 am | |
| Thomas | Mar 17, 2008 5:23 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: Running Mercurial using Nginx as http server | Actions... |
|---|---|---|
| From: | Thomas (iamk...@public.gmane.org) | |
| Date: | Jan 29, 2008 2:58:19 am | |
| List: | ru.sysoev.nginx | |
Hi Adrian
Thanks for your assistance. I will postpone nginx+mercurial to next week, I currently have some other stuff to work on. But I will definitely make it work using your guidelines. Also here is the documentation page from nginx about mod_swgi: http://wiki.codemongers.com/NginxNgxWSGIModule
I post it here for later reference.
On Jan 28, 2008 2:30 AM, Adrian Perez <adrianperez-N/zKP8...@public.gmane.org>
wrote:
El Sat, 26 Jan 2008 11:14:55 -0800 Cliff Wells <clif...@public.gmane.org> escribió:
On Sat, 2008-01-26 at 18:27 +0100, Thomas wrote:
Hi,
I am having some troubles getting Mercurial (the distributed Version Control System) to work with nginx. It uses a cgi script (hgweb.cgi) to launch mercurial which is a python program.
[...]
I'd recommend not using CGI. There are other ways to deploy Mercurial (as a quick Google search will tell you).
I would go for mod_wsgi. There is a wiki page which show how to set-up Apache (http://www.selenic.com/mercurial/wiki/index.cgi/mod_wsgi), and I has been able of setting up a test repository served with Nginx using Manlio Perillo's mod_wsgi for Nginx.
First, do some version control with Mercurial:
$ mkdir /tmp/hg-test && cd /tmp/hg-test && hg-init $ echo 'Hello world' > readme.txt $ hg add readme.txt && hg ci -m'Test commit'
Cast some magic words in the Nginx configuration file:
include wsgi_vars location / { wsgi_pass /tmp/hg-test.wsgi; }
Create /tmp/hg-test.wsgi with the following contents:
from mercurial.hgweb.hgwebdir_mod import hgwebdir from mercurial.hgweb.request import wsgiapplication application = wsgiapplication(lambda:hgwebdir("/tmp/hgwebdir.config"))
Finally, create /tmp/hgwebdir.config, contents should look like the following:
[web] style = gitweb [collections] /tmp = /tmp
(Re)Start Nginx and point your browser to the webserver... hgweb should appear in front of you :D
Of course, you should adjust paths to your particular setup, I used /tmp for testing, but it is *not* a safe setting!
Regards,
-Adrian
-- All dwarfs have beards and wear up to twelve layers of clothing. Gender is more or less optional. -- (Terry Pratchett, Guards! Guards!)







