Welcome! Log In Create A New Profile

Advanced

Configuring Hg as backend

Gautier DI FOLCO
November 27, 2012 11:12AM
Hi all,

I'm trying to set up Hg behind nginx (web view, clone, pull, push)
following the
official wiki: http://mercurial.selenic.com/wiki/HgServeNginx.
I have created an empty repository ($ hg init t1), set up the following
file (hgweb):
[web]
allow_push = *
push_ssl = false
baseurl = http://localhost/hg/

[paths]
/ = /tmp/hg/*

And the following nginx.conf:
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log error;
sendfile on;
keepalive_timeout 65;
include /etc/nginx/conf.d/*.conf;
server {
listen 80;
server_name localhost;
location ~ ^/hg/(.*)$ {
proxy_pass http://127.0.0.1:8000/$1;
}
}
I launch $ hg serve --web-conf hgweb.
The web view works well, but $ hg clone http://localhost/hg/t1 fails. It
prints
abort: 'http://localhost/hg/t1/' does not appear to be an hg repository:
---%<--- (text/html; charset=UTF-8)
**html output**
---%<---
!
instead of $ hg clone http://localhost:8000/t1 works. Requests are
different:
- With nginx:
127.0.0.1 - - [27/Nov/2012 16:21:08] "GET /t1/ HTTP/1.0" 200 -
127.0.0.1 - - [27/Nov/2012 16:21:08] "GET /t1/ HTTP/1.0" 200 -
127.0.0.1 - - [27/Nov/2012 16:21:08] "GET /t1/ HTTP/1.0" 200 -
127.0.0.1 - - [27/Nov/2012 16:21:08] "GET /t1/.hg/requires HTTP/1.0" 404 -
127.0.0.1 - - [27/Nov/2012 16:21:08] "GET /t1/.hg/00changelog.i HTTP/1.0"
404 -

- Without nginx:
127.0.0.1 - - [27/Nov/2012 16:21:32] "GET /t1/?cmd=capabilities HTTP/1.1"
200 -
127.0.0.1 - - [27/Nov/2012 16:21:32] "GET /t1/?cmd=batch HTTP/1.1" 200 -
x-hgarg-1:cmds=heads+%3Bknown+nodes%3D
127.0.0.1 - - [27/Nov/2012 16:21:32] "GET /t1/?cmd=listkeys HTTP/1.1" 200 -
x-hgarg-1:namespace=phases
127.0.0.1 - - [27/Nov/2012 16:21:32] "GET /t1/?cmd=listkeys HTTP/1.1" 200 -
x-hgarg-1:namespace=bookmarks

is there some of you who have had the same issue? How did you solve the
problem?
Have you got ideas on how to solve it?

For your help,
Thanks by advance.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Configuring Hg as backend

Gautier DI FOLCO November 27, 2012 11:12AM

Re: Configuring Hg as backend

Maxim Dounin November 27, 2012 11:26AM

Re: Configuring Hg as backend

Gautier DI FOLCO November 27, 2012 11:30AM

Re: Configuring Hg as backend

Gautier DI FOLCO November 27, 2012 11:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 301
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready