Mercurial > hgbook
comparison en/ch06-collab.xml @ 746:d0160b0b1a9e
Merge with http://hg.serpentine.com/mercurial/book
author | Dongsheng Song <dongsheng.song@gmail.com> |
---|---|
date | Wed, 18 Mar 2009 20:32:37 +0800 |
parents | a13813534ccd 8366882f67f2 |
children | e0ac2341a861 |
comparison
equal
deleted
inserted
replaced
745:c2cefd9f9893 | 746:d0160b0b1a9e |
---|---|
537 <quote><literal>hg.serpentine.com</literal></quote> gives | 537 <quote><literal>hg.serpentine.com</literal></quote> gives |
538 the hostname of the server to log into.</para> | 538 the hostname of the server to log into.</para> |
539 </listitem> | 539 </listitem> |
540 <listitem><para>The <quote>:22</quote> identifies the port | 540 <listitem><para>The <quote>:22</quote> identifies the port |
541 number to connect to the server on. The default port is | 541 number to connect to the server on. The default port is |
542 22, so you only need to specify this part if you're | 542 22, so you only need to specify a colon and port number if |
543 <emphasis>not</emphasis> using port 22.</para> | 543 you're <emphasis>not</emphasis> using port 22.</para> |
544 </listitem> | 544 </listitem> |
545 <listitem><para>The remainder of the URL is the local path to | 545 <listitem><para>The remainder of the URL is the local path to |
546 the repository on the server.</para> | 546 the repository on the server.</para> |
547 </listitem></orderedlist> | 547 </listitem></orderedlist> |
548 | 548 |
593 of ssh client commands.</para> | 593 of ssh client commands.</para> |
594 </listitem> | 594 </listitem> |
595 <listitem><para>If you have a high tolerance for pain, you can | 595 <listitem><para>If you have a high tolerance for pain, you can |
596 use the Cygwin port of OpenSSH.</para> | 596 use the Cygwin port of OpenSSH.</para> |
597 </listitem></itemizedlist> | 597 </listitem></itemizedlist> |
598 <para>In either case, you'll need to edit your \hgini\ file to | 598 <para>In either case, you'll need to edit your <filename |
599 role="special">hg.ini</filename> file to | |
599 tell Mercurial where to find the actual client command. For | 600 tell Mercurial where to find the actual client command. For |
600 example, if you're using PuTTY, you'll need to use the | 601 example, if you're using PuTTY, you'll need to use the |
601 <command>plink</command> command as a command-line ssh | 602 <command>plink</command> command as a command-line ssh |
602 client.</para> | 603 client.</para> |
603 <programlisting>[ui] ssh = C:/path/to/plink.exe -ssh -i | 604 <programlisting>[ui] |
604 "C:/path/to/my/private/key"</programlisting> | 605 ssh = C:/path/to/plink.exe -ssh -i "C:/path/to/my/private/key"</programlisting> |
605 | 606 |
606 <note> | 607 <note> |
607 <para> The path to <command>plink</command> shouldn't contain | 608 <para> The path to <command>plink</command> shouldn't contain |
608 any whitespace characters, or Mercurial may not be able to | 609 any whitespace characters, or Mercurial may not be able to |
609 run it correctly (so putting it in <filename | 610 run it correctly (so putting it in <filename |
610 class="directory">C:\\Program Files</filename> is probably | 611 class="directory">C:\Program Files</filename> is probably |
611 not a good idea).</para> | 612 not a good idea).</para> |
612 </note> | 613 </note> |
613 | 614 |
614 </sect2> | 615 </sect2> |
615 <sect2> | 616 <sect2> |
782 | 783 |
783 <para>Once you've verified that plain old ssh is working with | 784 <para>Once you've verified that plain old ssh is working with |
784 your server, the next step is to ensure that Mercurial runs on | 785 your server, the next step is to ensure that Mercurial runs on |
785 the server. The following command should run | 786 the server. The following command should run |
786 successfully:</para> | 787 successfully:</para> |
788 | |
787 <programlisting>ssh myserver hg version</programlisting> | 789 <programlisting>ssh myserver hg version</programlisting> |
790 | |
788 <para>If you see an error message instead of normal <command | 791 <para>If you see an error message instead of normal <command |
789 role="hg-cmd">hg version</command> output, this is usually | 792 role="hg-cmd">hg version</command> output, this is usually |
790 because you haven't installed Mercurial to <filename | 793 because you haven't installed Mercurial to <filename |
791 class="directory">/usr/bin</filename>. Don't worry if this | 794 class="directory">/usr/bin</filename>. Don't worry if this |
792 is the case; you don't need to do that. But you should check | 795 is the case; you don't need to do that. But you should check |
839 minutes to 17 minutes.</para> | 842 minutes to 17 minutes.</para> |
840 | 843 |
841 <para>Both <command>ssh</command> and <command>plink</command> | 844 <para>Both <command>ssh</command> and <command>plink</command> |
842 accept a <option role="cmd-opt-ssh">-C</option> option which | 845 accept a <option role="cmd-opt-ssh">-C</option> option which |
843 turns on compression. You can easily edit your <filename | 846 turns on compression. You can easily edit your <filename |
844 role="special"> /.hgrc</filename>\ to enable compression for | 847 role="special">~/.hgrc</filename> to enable compression for |
845 all of Mercurial's uses of the ssh protocol.</para> | 848 all of Mercurial's uses of the ssh protocol.</para> |
846 <programlisting>[ui] ssh = ssh -C</programlisting> | 849 <programlisting>[ui] |
850 ssh = ssh -C</programlisting> | |
847 | 851 |
848 <para>If you use <command>ssh</command>, you can configure it to | 852 <para>If you use <command>ssh</command>, you can configure it to |
849 always use compression when talking to your server. To do | 853 always use compression when talking to your server. To do |
850 this, edit your <filename | 854 this, edit your <filename |
851 role="special">.ssh/config</filename> file (which may not | 855 role="special">.ssh/config</filename> file (which may not |
852 yet exist), as follows.</para> | 856 yet exist), as follows.</para> |
853 <programlisting>Host hg Compression yes HostName | 857 <programlisting>Host hg |
854 hg.example.com</programlisting> | 858 Compression yes |
859 HostName hg.example.com</programlisting> | |
855 <para>This defines an alias, <literal>hg</literal>. When you | 860 <para>This defines an alias, <literal>hg</literal>. When you |
856 use it on the <command>ssh</command> command line or in a | 861 use it on the <command>ssh</command> command line or in a |
857 Mercurial <literal>ssh</literal>-protocol URL, it will cause | 862 Mercurial <literal>ssh</literal>-protocol URL, it will cause |
858 <command>ssh</command> to connect to | 863 <command>ssh</command> to connect to |
859 <literal>hg.example.com</literal> and use compression. This | 864 <literal>hg.example.com</literal> and use compression. This |
924 subdirectory named something like <filename | 929 subdirectory named something like <filename |
925 class="directory">public_html</filename> in their home | 930 class="directory">public_html</filename> in their home |
926 directory, from which they can serve up web pages. A file | 931 directory, from which they can serve up web pages. A file |
927 named <filename>foo</filename> in this directory will be | 932 named <filename>foo</filename> in this directory will be |
928 accessible at a URL of the form | 933 accessible at a URL of the form |
929 <literal>http://www.example.com/\ | 934 <literal>http://www.example.com/username/foo</literal>.</para> |
930 {</literal>username/foo}.</para> | |
931 | 935 |
932 <para>To get started, find the <filename | 936 <para>To get started, find the <filename |
933 role="special">hgweb.cgi</filename> script that should be | 937 role="special">hgweb.cgi</filename> script that should be |
934 present in your Mercurial installation. If you can't quickly | 938 present in your Mercurial installation. If you can't quickly |
935 find a local copy on your system, simply download one from the | 939 find a local copy on your system, simply download one from the |
937 url="http://www.selenic.com/repo/hg/raw-file/tip/hgweb.cgi">http://www.selenic.com/repo/hg/raw-file/tip/hgweb.cgi</ulink>.</para> | 941 url="http://www.selenic.com/repo/hg/raw-file/tip/hgweb.cgi">http://www.selenic.com/repo/hg/raw-file/tip/hgweb.cgi</ulink>.</para> |
938 | 942 |
939 <para>You'll need to copy this script into your <filename | 943 <para>You'll need to copy this script into your <filename |
940 class="directory">public_html</filename> directory, and | 944 class="directory">public_html</filename> directory, and |
941 ensure that it's executable.</para> | 945 ensure that it's executable.</para> |
942 <programlisting>cp .../hgweb.cgi ~/public_html chmod 755 | 946 <programlisting>cp .../hgweb.cgi ~/public_html |
943 ~/public_html/hgweb.cgi</programlisting> | 947 chmod 755 ~/public_html/hgweb.cgi</programlisting> |
944 <para>The <literal>755</literal> argument to | 948 <para>The <literal>755</literal> argument to |
945 <command>chmod</command> is a little more general than just | 949 <command>chmod</command> is a little more general than just |
946 making the script executable: it ensures that the script is | 950 making the script executable: it ensures that the script is |
947 executable by anyone, and that <quote>group</quote> and | 951 executable by anyone, and that <quote>group</quote> and |
948 <quote>other</quote> write permissions are | 952 <quote>other</quote> write permissions are |
987 The web server must be able to traverse your home directory | 991 The web server must be able to traverse your home directory |
988 and directories under your <filename | 992 and directories under your <filename |
989 class="directory">public_html</filename> directory, and | 993 class="directory">public_html</filename> directory, and |
990 read files under the latter too. Here's a quick recipe to | 994 read files under the latter too. Here's a quick recipe to |
991 help you to make your permissions more appropriate.</para> | 995 help you to make your permissions more appropriate.</para> |
992 <programlisting>chmod 755 ~ find ~/public_html -type d -print0 | 996 <programlisting>chmod 755 ~ |
993 | xargs -0r chmod 755 find ~/public_html -type f -print0 | | 997 find ~/public_html -type d -print0 | xargs -0r chmod 755 |
994 xargs -0r chmod 644</programlisting> | 998 find ~/public_html -type f -print0 | xargs -0r chmod 644</programlisting> |
995 | 999 |
996 <para>The other possibility with permissions is that you might | 1000 <para>The other possibility with permissions is that you might |
997 get a completely empty window when you try to load the | 1001 get a completely empty window when you try to load the |
998 script. In this case, it's likely that your access | 1002 script. In this case, it's likely that your access |
999 permissions are <emphasis>too permissive</emphasis>. Apache's | 1003 permissions are <emphasis>too permissive</emphasis>. Apache's |
1002 | 1006 |
1003 <para>Your web server may be configured to disallow execution | 1007 <para>Your web server may be configured to disallow execution |
1004 of CGI programs in your per-user web directory. Here's | 1008 of CGI programs in your per-user web directory. Here's |
1005 Apache's default per-user configuration from my Fedora | 1009 Apache's default per-user configuration from my Fedora |
1006 system.</para> | 1010 system.</para> |
1007 <programlisting><Directory /home/*/public_html> | 1011 |
1008 AllowOverride FileInfo AuthConfig Limit Options MultiViews | 1012 &ch06-apache-config.lst; |
1009 Indexes SymLinksIfOwnerMatch IncludesNoExec <Limit GET | 1013 |
1010 POST OPTIONS> Order allow,deny Allow from all | |
1011 </Limit> <LimitExcept GET POST OPTIONS> Order | |
1012 deny,allow Deny from all </LimitExcept> | |
1013 </Directory></programlisting> | |
1014 <para>If you find a similar-looking | 1014 <para>If you find a similar-looking |
1015 <literal>Directory</literal> group in your Apache | 1015 <literal>Directory</literal> group in your Apache |
1016 configuration, the directive to look at inside it is | 1016 configuration, the directive to look at inside it is |
1017 <literal>Options</literal>. Add <literal>ExecCGI</literal> | 1017 <literal>Options</literal>. Add <literal>ExecCGI</literal> |
1018 to the end of this list if it's missing, and restart the web | 1018 to the end of this list if it's missing, and restart the web |
1074 <literal>mod_access</literal> section of its config file to | 1074 <literal>mod_access</literal> section of its config file to |
1075 enable <literal>mod_cgi</literal> and | 1075 enable <literal>mod_cgi</literal> and |
1076 <literal>mod_userdir</literal>, both of which were disabled | 1076 <literal>mod_userdir</literal>, both of which were disabled |
1077 by default on my system. I then added a few lines to the | 1077 by default on my system. I then added a few lines to the |
1078 end of the config file, to configure these modules.</para> | 1078 end of the config file, to configure these modules.</para> |
1079 <programlisting>userdir.path = "public_html" cgi.assign = ( | 1079 <programlisting>userdir.path = "public_html" |
1080 ".cgi" => "" )</programlisting> | 1080 cgi.assign = (".cgi" => "" )</programlisting> |
1081 <para>With this done, <literal>lighttpd</literal> ran | 1081 <para>With this done, <literal>lighttpd</literal> ran |
1082 immediately for me. If I had configured | 1082 immediately for me. If I had configured |
1083 <literal>lighttpd</literal> before Apache, I'd almost | 1083 <literal>lighttpd</literal> before Apache, I'd almost |
1084 certainly have run into many of the same system-level | 1084 certainly have run into many of the same system-level |
1085 configuration problems as I did with Apache. However, I | 1085 configuration problems as I did with Apache. However, I |
1110 url="http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi">http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi</ulink>.</para> | 1110 url="http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi">http://www.selenic.com/repo/hg/raw-file/tip/hgwebdir.cgi</ulink>.</para> |
1111 | 1111 |
1112 <para>You'll need to copy this script into your <filename | 1112 <para>You'll need to copy this script into your <filename |
1113 class="directory">public_html</filename> directory, and | 1113 class="directory">public_html</filename> directory, and |
1114 ensure that it's executable.</para> | 1114 ensure that it's executable.</para> |
1115 <programlisting>cp .../hgwebdir.cgi ~/public_html chmod 755 | 1115 <programlisting>cp .../hgwebdir.cgi ~/public_html |
1116 ~/public_html ~/public_html/hgwebdir.cgi</programlisting> | 1116 chmod 755 ~/public_html ~/public_html/hgwebdir.cgi</programlisting> |
1117 <para>With basic configuration out of the way, try to visit | 1117 <para>With basic configuration out of the way, try to visit |
1118 <ulink url="http://myhostname/ | 1118 <ulink url="http://myhostname/ |
1119 myuser/hgwebdir.cgi">http://myhostname/ | 1119 myuser/hgwebdir.cgi">http://myhostname/ |
1120 myuser/hgwebdir.cgi</ulink> in your browser. It should | 1120 myuser/hgwebdir.cgi</ulink> in your browser. It should |
1121 display an empty list of repositories. If you get a blank | 1121 display an empty list of repositories. If you get a blank |
1137 role="special">hgwebdir.cgi</filename> is with a section | 1137 role="special">hgwebdir.cgi</filename> is with a section |
1138 named <literal>collections</literal>. This will automatically | 1138 named <literal>collections</literal>. This will automatically |
1139 publish <emphasis>every</emphasis> repository under the | 1139 publish <emphasis>every</emphasis> repository under the |
1140 directories you name. The section should look like | 1140 directories you name. The section should look like |
1141 this:</para> | 1141 this:</para> |
1142 <programlisting>[collections] /my/root = | 1142 <programlisting>[collections] |
1143 /my/root</programlisting> | 1143 /my/root = /my/root</programlisting> |
1144 <para>Mercurial interprets this by looking at the directory name | 1144 <para>Mercurial interprets this by looking at the directory name |
1145 on the <emphasis>right</emphasis> hand side of the | 1145 on the <emphasis>right</emphasis> hand side of the |
1146 <quote><literal>=</literal></quote> sign; finding repositories | 1146 <quote><literal>=</literal></quote> sign; finding repositories |
1147 in that directory hierarchy; and using the text on the | 1147 in that directory hierarchy; and using the text on the |
1148 <emphasis>left</emphasis> to strip off matching text from the | 1148 <emphasis>left</emphasis> to strip off matching text from the |
1197 mechanism, the <filename | 1197 mechanism, the <filename |
1198 role="special">hgwebdir.cgi</filename> script allows you | 1198 role="special">hgwebdir.cgi</filename> script allows you |
1199 to publish a specific list of repositories. To do so, | 1199 to publish a specific list of repositories. To do so, |
1200 create a <literal>paths</literal> section, with contents of | 1200 create a <literal>paths</literal> section, with contents of |
1201 the following form.</para> | 1201 the following form.</para> |
1202 <programlisting>[paths] repo1 = /my/path/to/some/repo repo2 = | 1202 <programlisting>[paths] |
1203 /some/path/to/another</programlisting> | 1203 repo1 = /my/path/to/some/repo |
1204 repo2 = /some/path/to/another</programlisting> | |
1204 <para>In this case, the virtual path (the component that will | 1205 <para>In this case, the virtual path (the component that will |
1205 appear in a URL) is on the left hand side of each | 1206 appear in a URL) is on the left hand side of each |
1206 definition, while the path to the repository is on the | 1207 definition, while the path to the repository is on the |
1207 right. Notice that there does not need to be any | 1208 right. Notice that there does not need to be any |
1208 relationship between the virtual path you choose and the | 1209 relationship between the virtual path you choose and the |
1232 | 1233 |
1233 <para>By default, this feature is not enabled. To enable it, | 1234 <para>By default, this feature is not enabled. To enable it, |
1234 you'll need to add an <envar | 1235 you'll need to add an <envar |
1235 role="rc-item-web">allow_archive</envar> item to the | 1236 role="rc-item-web">allow_archive</envar> item to the |
1236 <literal role="rc-web">web</literal> section of your <filename | 1237 <literal role="rc-web">web</literal> section of your <filename |
1237 role="special"> /.hgrc</filename>.</para> | 1238 role="special">~/.hgrc</filename>.</para> |
1238 | 1239 |
1239 </sect2> | 1240 </sect2> |
1240 <sect2> | 1241 <sect2> |
1241 <title>Web configuration options</title> | 1242 <title>Web configuration options</title> |
1242 | 1243 |
1275 </itemizedlist> | 1276 </itemizedlist> |
1276 <para> If you provide an empty list, or don't have an | 1277 <para> If you provide an empty list, or don't have an |
1277 <envar role="rc-item-web">allow_archive</envar> entry at | 1278 <envar role="rc-item-web">allow_archive</envar> entry at |
1278 all, this feature will be disabled. Here is an example of | 1279 all, this feature will be disabled. Here is an example of |
1279 how to enable all three supported formats.</para> | 1280 how to enable all three supported formats.</para> |
1280 <programlisting>[web] allow_archive = bz2 gz | 1281 <programlisting>[web] |
1281 zip</programlisting> | 1282 allow_archive = bz2 gz zip</programlisting> |
1282 </listitem> | 1283 </listitem> |
1283 <listitem><para><envar role="rc-item-web">allowpull</envar>: | 1284 <listitem><para><envar role="rc-item-web">allowpull</envar>: |
1284 Boolean. Determines whether the web interface allows | 1285 Boolean. Determines whether the web interface allows |
1285 remote users to <command role="hg-cmd">hg pull</command> | 1286 remote users to <command role="hg-cmd">hg pull</command> |
1286 and <command role="hg-cmd">hg clone</command> this | 1287 and <command role="hg-cmd">hg clone</command> this |
1294 identifying the person or group in charge of the | 1295 identifying the person or group in charge of the |
1295 repository. This often contains the name and email | 1296 repository. This often contains the name and email |
1296 address of a person or mailing list. It often makes sense | 1297 address of a person or mailing list. It often makes sense |
1297 to place this entry in a repository's own <filename | 1298 to place this entry in a repository's own <filename |
1298 role="special">.hg/hgrc</filename> file, but it can make | 1299 role="special">.hg/hgrc</filename> file, but it can make |
1299 sense to use in a global <filename role="special"> | 1300 sense to use in a global <filename |
1300 /.hgrc</filename>\ if every repository has a single | 1301 role="special">~/.hgrc</filename> if every repository |
1301 maintainer.</para> | 1302 has a single maintainer.</para> |
1302 </listitem> | 1303 </listitem> |
1303 <listitem><para><envar role="rc-item-web">maxchanges</envar>: | 1304 <listitem><para><envar role="rc-item-web">maxchanges</envar>: |
1304 Integer. The default maximum number of changesets to | 1305 Integer. The default maximum number of changesets to |
1305 display in a single page of output.</para> | 1306 display in a single page of output.</para> |
1306 </listitem> | 1307 </listitem> |
1321 (the latter is much more visually attractive). You can | 1322 (the latter is much more visually attractive). You can |
1322 also specify a custom template of your own; see chapter | 1323 also specify a custom template of your own; see chapter |
1323 <xref linkend="chap.template"/> for details. | 1324 <xref linkend="chap.template"/> for details. |
1324 Here, you can see how to enable the | 1325 Here, you can see how to enable the |
1325 <literal>gitweb</literal> style.</para> | 1326 <literal>gitweb</literal> style.</para> |
1326 <programlisting>[web] style = gitweb</programlisting> | 1327 <programlisting>[web] |
1328 style = gitweb</programlisting> | |
1327 </listitem> | 1329 </listitem> |
1328 <listitem><para><envar role="rc-item-web">templates</envar>: | 1330 <listitem><para><envar role="rc-item-web">templates</envar>: |
1329 Path. The directory in which to search for template | 1331 Path. The directory in which to search for template |
1330 files. By default, Mercurial searches in the directory in | 1332 files. By default, Mercurial searches in the directory in |
1331 which it was installed.</para> | 1333 which it was installed.</para> |
1333 <para>If you are using <filename | 1335 <para>If you are using <filename |
1334 role="special">hgwebdir.cgi</filename>, you can place a few | 1336 role="special">hgwebdir.cgi</filename>, you can place a few |
1335 configuration items in a <literal role="rc-web">web</literal> | 1337 configuration items in a <literal role="rc-web">web</literal> |
1336 section of the <filename | 1338 section of the <filename |
1337 role="special">hgweb.config</filename> file instead of a | 1339 role="special">hgweb.config</filename> file instead of a |
1338 <filename role="special"> /.hgrc</filename>\ file, for | 1340 <filename role="special">~/.hgrc</filename> file, for |
1339 convenience. These items are <envar | 1341 convenience. These items are <envar |
1340 role="rc-item-web">motd</envar> and <envar | 1342 role="rc-item-web">motd</envar> and <envar |
1341 role="rc-item-web">style</envar>.</para> | 1343 role="rc-item-web">style</envar>.</para> |
1342 | 1344 |
1343 <sect3> | 1345 <sect3> |
1344 <title>Options specific to an individual repository</title> | 1346 <title>Options specific to an individual repository</title> |
1345 | 1347 |
1346 <para>A few <literal role="rc-web">web</literal> configuration | 1348 <para>A few <literal role="rc-web">web</literal> configuration |
1347 items ought to be placed in a repository's local <filename | 1349 items ought to be placed in a repository's local <filename |
1348 role="special">.hg/hgrc</filename>, rather than a user's | 1350 role="special">.hg/hgrc</filename>, rather than a user's |
1349 or global <filename role="special"> | 1351 or global <filename role="special">~/.hgrc</filename>.</para> |
1350 /.hgrc</filename>.</para> | |
1351 <itemizedlist> | 1352 <itemizedlist> |
1352 <listitem><para><envar | 1353 <listitem><para><envar |
1353 role="rc-item-web">description</envar>: String. A | 1354 role="rc-item-web">description</envar>: String. A |
1354 free-form (but preferably brief) string that describes | 1355 free-form (but preferably brief) string that describes |
1355 the contents or purpose of the repository.</para> | 1356 the contents or purpose of the repository.</para> |
1365 <title>Options specific to the <command role="hg-cmd">hg | 1366 <title>Options specific to the <command role="hg-cmd">hg |
1366 serve</command> command</title> | 1367 serve</command> command</title> |
1367 | 1368 |
1368 <para>Some of the items in the <literal | 1369 <para>Some of the items in the <literal |
1369 role="rc-web">web</literal> section of a <filename | 1370 role="rc-web">web</literal> section of a <filename |
1370 role="special"> /.hgrc</filename>\ file are only for use | 1371 role="special">~/.hgrc</filename> file are only for use |
1371 with the <command role="hg-cmd">hg serve</command> | 1372 with the <command role="hg-cmd">hg serve</command> |
1372 command.</para> | 1373 command.</para> |
1373 <itemizedlist> | 1374 <itemizedlist> |
1374 <listitem><para><envar role="rc-item-web">accesslog</envar>: | 1375 <listitem><para><envar role="rc-item-web">accesslog</envar>: |
1375 Path. The name of a file into which to write an access | 1376 Path. The name of a file into which to write an access |
1399 listen. The default port number used is 8000.</para> | 1400 listen. The default port number used is 8000.</para> |
1400 </listitem></itemizedlist> | 1401 </listitem></itemizedlist> |
1401 | 1402 |
1402 </sect3> | 1403 </sect3> |
1403 <sect3> | 1404 <sect3> |
1404 <title>Choosing the right <filename role="special"> | 1405 <title>Choosing the right <filename |
1405 /.hgrc</filename>\ file to add <literal | 1406 role="special">~/.hgrc</filename> file to add <literal |
1406 role="rc-web">web</literal> items to</title> | 1407 role="rc-web">web</literal> items to</title> |
1407 | 1408 |
1408 <para>It is important to remember that a web server like | 1409 <para>It is important to remember that a web server like |
1409 Apache or <literal>lighttpd</literal> will run under a user | 1410 Apache or <literal>lighttpd</literal> will run under a user |
1410 ID that is different to yours. CGI scripts run by your | 1411 ID that is different to yours. CGI scripts run by your |
1411 server, such as <filename | 1412 server, such as <filename |
1412 role="special">hgweb.cgi</filename>, will usually also run | 1413 role="special">hgweb.cgi</filename>, will usually also run |
1413 under that user ID.</para> | 1414 under that user ID.</para> |
1414 | 1415 |
1415 <para>If you add <literal role="rc-web">web</literal> items to | 1416 <para>If you add <literal role="rc-web">web</literal> items to |
1416 your own personal <filename role="special"> | 1417 your own personal <filename role="special">~/.hgrc</filename> file, CGI scripts won't read that |
1417 /.hgrc</filename>\ file, CGI scripts won't read that | 1418 <filename role="special">~/.hgrc</filename> file. Those |
1418 <filename role="special"> /.hgrc</filename>\ file. Those | |
1419 settings will thus only affect the behaviour of the <command | 1419 settings will thus only affect the behaviour of the <command |
1420 role="hg-cmd">hg serve</command> command when you run it. | 1420 role="hg-cmd">hg serve</command> command when you run it. |
1421 To cause CGI scripts to see your settings, either create a | 1421 To cause CGI scripts to see your settings, either create a |
1422 <filename role="special"> /.hgrc</filename>\ file in the | 1422 <filename role="special">~/.hgrc</filename> file in the |
1423 home directory of the user ID that runs your web server, or | 1423 home directory of the user ID that runs your web server, or |
1424 add those settings to a system-wide <filename | 1424 add those settings to a system-wide <filename |
1425 role="special"> /.hgrc</filename>\ file.</para> | 1425 role="special">~/.hgrc</filename> file.</para> |
1426 | 1426 |
1427 | 1427 |
1428 </sect3> | 1428 </sect3> |
1429 </sect2> | 1429 </sect2> |
1430 </sect1> | 1430 </sect1> |