| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> |
| 4 |
<head> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 6 |
<meta name="generator" content="Docutils 0.21.2: https://docutils.sourceforge.io/" /> |
| 7 |
<title>hg serve</title> |
| 8 |
<link rel="stylesheet" href="../style.css" type="text/css" /> |
| 9 |
</head> |
| 10 |
<body> |
| 11 |
<div class="document" id="hg-serve"> |
| 12 |
<span id="hg-serve-1"></span> |
| 13 |
<h1 class="title">hg serve</h1> |
| 14 |
<h2 class="subtitle" id="start-stand-alone-webserver">start stand-alone webserver</h2> |
| 15 |
|
| 16 |
<div class="contents htmlonly topic" id="contents"> |
| 17 |
<p class="topic-title"><a class="reference internal" href="#top">Contents</a></p> |
| 18 |
<ul class="simple"> |
| 19 |
<li><a class="reference internal" href="#synopsis" id="toc-entry-1">Synopsis</a></li> |
| 20 |
<li><a class="reference internal" href="#description" id="toc-entry-2">Description</a></li> |
| 21 |
<li><a class="reference internal" href="#options" id="toc-entry-3">Options</a></li> |
| 22 |
</ul> |
| 23 |
</div> |
| 24 |
<div class="section" id="synopsis"> |
| 25 |
<h1><a class="toc-backref" href="#contents">Synopsis</a></h1> |
| 26 |
<pre class="literal-block"> |
| 27 |
hg serve [OPTION]... |
| 28 |
</pre> |
| 29 |
</div> |
| 30 |
<div class="section" id="description"> |
| 31 |
<h1><a class="toc-backref" href="#contents">Description</a></h1> |
| 32 |
<p>Start a local HTTP repository browser and pull server. You can use |
| 33 |
this for ad-hoc sharing and browsing of repositories. It is |
| 34 |
recommended to use a real web server to serve a repository for |
| 35 |
longer periods of time.</p> |
| 36 |
<p>Please note that the server does not implement access control. |
| 37 |
This means that, by default, anybody can read from the server and |
| 38 |
nobody can write to it by default. Set the <tt class="docutils literal"><span class="pre">web.allow-push</span></tt> |
| 39 |
option to <tt class="docutils literal">*</tt> to allow everybody to push to the server. You |
| 40 |
should use a real web server if you need to authenticate users.</p> |
| 41 |
<p>By default, the server logs accesses to stdout and errors to |
| 42 |
stderr. Use the -A/--accesslog and -E/--errorlog options to log to |
| 43 |
files.</p> |
| 44 |
<p>To have the server choose a free port number to listen on, specify |
| 45 |
a port number of 0; in this case, the server will print the port |
| 46 |
number it uses.</p> |
| 47 |
<p>Returns 0 on success.</p> |
| 48 |
</div> |
| 49 |
<div class="section" id="options"> |
| 50 |
<h1><a class="toc-backref" href="#contents">Options</a></h1> |
| 51 |
<table class="docutils option-list" frame="void" rules="none"> |
| 52 |
<col class="option" /> |
| 53 |
<col class="description" /> |
| 54 |
<tbody valign="top"> |
| 55 |
<tr><td class="option-group" colspan="2"> |
| 56 |
<kbd><span class="option">-A</span>, <span class="option">--accesslog <var><FILE></var></span></kbd></td> |
| 57 |
</tr> |
| 58 |
<tr><td> </td><td>name of access log file to write to</td></tr> |
| 59 |
<tr><td class="option-group"> |
| 60 |
<kbd><span class="option">-d</span>, <span class="option">--daemon</span></kbd></td> |
| 61 |
<td>run server in background</td></tr> |
| 62 |
<tr><td class="option-group" colspan="2"> |
| 63 |
<kbd><span class="option">--daemon-postexec <var><VALUE[+]></var></span></kbd></td> |
| 64 |
</tr> |
| 65 |
<tr><td> </td><td>used internally by daemon mode</td></tr> |
| 66 |
<tr><td class="option-group" colspan="2"> |
| 67 |
<kbd><span class="option">-E</span>, <span class="option">--errorlog <var><FILE></var></span></kbd></td> |
| 68 |
</tr> |
| 69 |
<tr><td> </td><td>name of error log file to write to</td></tr> |
| 70 |
<tr><td class="option-group" colspan="2"> |
| 71 |
<kbd><span class="option">-p</span>, <span class="option">--port <var><PORT></var></span></kbd></td> |
| 72 |
</tr> |
| 73 |
<tr><td> </td><td>port to listen on (default: 8000)</td></tr> |
| 74 |
<tr><td class="option-group" colspan="2"> |
| 75 |
<kbd><span class="option">-a</span>, <span class="option">--address <var><ADDR></var></span></kbd></td> |
| 76 |
</tr> |
| 77 |
<tr><td> </td><td>address to listen on (default: all interfaces)</td></tr> |
| 78 |
<tr><td class="option-group" colspan="2"> |
| 79 |
<kbd><span class="option">--prefix <var><PREFIX></var></span></kbd></td> |
| 80 |
</tr> |
| 81 |
<tr><td> </td><td>prefix path to serve from (default: server root)</td></tr> |
| 82 |
<tr><td class="option-group" colspan="2"> |
| 83 |
<kbd><span class="option">-n</span>, <span class="option">--name <var><NAME></var></span></kbd></td> |
| 84 |
</tr> |
| 85 |
<tr><td> </td><td>name to show in web pages (default: working directory)</td></tr> |
| 86 |
<tr><td class="option-group" colspan="2"> |
| 87 |
<kbd><span class="option">--web-conf <var><FILE></var></span></kbd></td> |
| 88 |
</tr> |
| 89 |
<tr><td> </td><td>name of the hgweb config file (see 'hg help hgweb')</td></tr> |
| 90 |
<tr><td class="option-group" colspan="2"> |
| 91 |
<kbd><span class="option">--webdir-conf <var><FILE></var></span></kbd></td> |
| 92 |
</tr> |
| 93 |
<tr><td> </td><td>name of the hgweb config file (DEPRECATED)</td></tr> |
| 94 |
<tr><td class="option-group" colspan="2"> |
| 95 |
<kbd><span class="option">--pid-file <var><FILE></var></span></kbd></td> |
| 96 |
</tr> |
| 97 |
<tr><td> </td><td>name of file to write process ID to</td></tr> |
| 98 |
<tr><td class="option-group"> |
| 99 |
<kbd><span class="option">--stdio</span></kbd></td> |
| 100 |
<td>for remote clients (ADVANCED)</td></tr> |
| 101 |
<tr><td class="option-group" colspan="2"> |
| 102 |
<kbd><span class="option">--cmdserver <var><MODE></var></span></kbd></td> |
| 103 |
</tr> |
| 104 |
<tr><td> </td><td>for remote clients (ADVANCED)</td></tr> |
| 105 |
<tr><td class="option-group" colspan="2"> |
| 106 |
<kbd><span class="option">-t</span>, <span class="option">--templates <var><TEMPLATE></var></span></kbd></td> |
| 107 |
</tr> |
| 108 |
<tr><td> </td><td>web templates to use</td></tr> |
| 109 |
<tr><td class="option-group" colspan="2"> |
| 110 |
<kbd><span class="option">--style <var><STYLE></var></span></kbd></td> |
| 111 |
</tr> |
| 112 |
<tr><td> </td><td>template style to use</td></tr> |
| 113 |
<tr><td class="option-group"> |
| 114 |
<kbd><span class="option">-6</span>, <span class="option">--ipv6</span></kbd></td> |
| 115 |
<td>use IPv6 instead of IPv4</td></tr> |
| 116 |
<tr><td class="option-group" colspan="2"> |
| 117 |
<kbd><span class="option">--certificate <var><FILE></var></span></kbd></td> |
| 118 |
</tr> |
| 119 |
<tr><td> </td><td>SSL certificate file</td></tr> |
| 120 |
<tr><td class="option-group"> |
| 121 |
<kbd><span class="option">--print-url</span></kbd></td> |
| 122 |
<td>start and print only the URL</td></tr> |
| 123 |
<tr><td class="option-group"> |
| 124 |
<kbd><span class="option">-S</span>, <span class="option">--subrepos</span></kbd></td> |
| 125 |
<td>recurse into subrepositories</td></tr> |
| 126 |
</tbody> |
| 127 |
</table> |
| 128 |
<p>[+] marked option can be specified multiple times</p> |
| 129 |
</div> |
| 130 |
</div> |
| 131 |
</body> |
| 132 |
</html> |