Configure authentication

to create a htpasswd file just run :

htpasswd -c # -c create or overwrite

and supply a password. If you want to give a new user commit rights, simply run :

htpasswd

Configure hg

Then you need to set a config file for hg serve which lists the repositories. you can place this file where you want (just keep seurity basics in mind) and put inside a section path containing your repos like this (ie: /path/to/hgweb.conf):

[paths]
repo_one = /path/to/repo_one
repo_two = /path/to/repo_two

You may also want t allow push tp your repositrories, so edit all /
/.hg/hgrc and add the following lines :

[web]
push_ssl = false
allow_push = *

Run for fun

Now, your ready to run :

hg serve --webdir-conf=/path/to/hgweb.conf --port 10000
sudo /etc/init.d/nginx restart # note you may need to remove the default example site if you already have a web server running on port 80