Hi all,<br><br>I'm trying to set up Hg behind nginx (web view, clone, pull, push) following the<br>official wiki: <a href="http://mercurial.selenic.com/wiki/HgServeNginx">http://mercurial.selenic.com/wiki/HgServeNginx</a>.<br>
I have created an empty repository ($ hg init t1), set up the following file (hgweb):<br><div style="margin-left:40px">[web]<br>allow_push = *<br>push_ssl = false<br>baseurl = <a href="http://localhost/hg/">http://localhost/hg/</a><br>
<br>[paths]<br>/ = /tmp/hg/*<br></div><br>And the following nginx.conf:<br><div style="margin-left:40px">user              nginx;<br>worker_processes  1;<br>error_log  /var/log/nginx/error.log;<br>pid        /run/nginx.pid;<br>
events {<br>    worker_connections  1024;<br>}<br>http {<br>    include       /etc/nginx/mime.types;<br>    default_type  application/octet-stream;<br>    access_log  /var/log/nginx/access.log  main;<br>    error_log  /var/log/nginx/error.log  error;<br>
    sendfile        on;<br>    keepalive_timeout  65;<br>    include /etc/nginx/conf.d/*.conf;<br>    server {<br>        listen 80;<br>        server_name localhost;<br>    location ~ ^/hg/(.*)$ {<br>        proxy_pass         <a href="http://127.0.0.1:8000/$1">http://127.0.0.1:8000/$1</a>;<br>
    }<br>}<br></div>I launch $ hg serve --web-conf hgweb.<br>The web view works well, but $ hg clone <a href="http://localhost/hg/t1">http://localhost/hg/t1</a> fails. It prints<br>abort: '<a href="http://localhost/hg/t1/">http://localhost/hg/t1/</a>' does not appear to be an hg repository:<br>
---%<--- (text/html; charset=UTF-8)<br>**html output**<br>---%<---<br>!<br>instead of $ hg clone <a href="http://localhost:8000/t1">http://localhost:8000/t1</a> works. Requests are different:<br> - With nginx:<br><div style="margin-left:40px">
127.0.0.1 - - [27/Nov/2012 16:21:08] "GET /t1/ HTTP/1.0" 200 -<br>127.0.0.1 - - [27/Nov/2012 16:21:08] "GET /t1/ HTTP/1.0" 200 -<br>127.0.0.1 - - [27/Nov/2012 16:21:08] "GET /t1/ HTTP/1.0" 200 -<br>
127.0.0.1 - - [27/Nov/2012 16:21:08] "GET /t1/.hg/requires HTTP/1.0" 404 -<br>127.0.0.1 - - [27/Nov/2012 16:21:08] "GET /t1/.hg/00changelog.i HTTP/1.0" 404 -<br></div><br> - Without nginx:<br><div style="margin-left:40px">
127.0.0.1 - - [27/Nov/2012 16:21:32] "GET /t1/?cmd=capabilities HTTP/1.1" 200 -<br>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<br>127.0.0.1 - - [27/Nov/2012 16:21:32] "GET /t1/?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=phases<br>
127.0.0.1 - - [27/Nov/2012 16:21:32] "GET /t1/?cmd=listkeys HTTP/1.1" 200 - x-hgarg-1:namespace=bookmarks<br></div><br>is there some of you who have had the same issue? How did you solve the problem?<br>Have you got ideas on how to solve it?<br>
<br>For your help,<br>Thanks by advance.<br>