Differences between revisions 11 and 13 (spanning 2 versions)
Revision 11 as of 2007-03-14 20:35:04
Size: 1670
Editor: 10
Revision 13 as of 2008-03-27 12:48:06
Size: 1702
Editor: abuehl
Comment: +cat
Deletions are marked like this. Additions are marked like this.
Line 42: Line 42:
CategoryCommand CategoryWeb

Mercurial has a built-in light-weight web server which can be used for browsing a repository with a web browser or for allowing remote machines to pull from you. To use it, simply run:

$ hg serve

And then point your web browser at http://localhost:8000/.

The built-in web server is missing some features found in other web servers, including access control, authentication, SSL, etc. These are especially useful if you want to be able to securely push to a web-based repository. Thus, if you want to make a more permanent server, you should probably use a [:CGI_Install:CGI-based server].

Following are detailed options for using hg's HTTP server:

$ hg help serve
hg serve [OPTION]...

export the repository via HTTP

    Start a local HTTP repository browser and pull server.

    By default, the server logs accesses to stdout and errors to
    stderr.  Use the "-A" and "-E" options to log to files.


 -A --accesslog       name of access log file to write to
 -d --daemon          run server in background
    --daemon-pipefds  used internally by daemon mode
 -E --errorlog        name of error log file to write to
 -p --port            port to use (default: 8000)
 -a --address         address to use
 -n --name            name to show in web pages (default: working dir)
    --webdir-conf     name of the webdir config file (serve more than one repo)
    --pid-file        name of file to write process ID to
    --stdio           for remote clients
 -t --templates       web templates to use
    --style           template style to use
 -6 --ipv6            use IPv6 in addition to IPv4

CategoryCommand CategoryWeb

hgserve (last edited 2012-10-25 19:49:02 by mpm)