LoginSignup
0
0

More than 5 years have passed since last update.

hgwebdirとApacheでMercurialのリポジトリを参照できるようにする

Posted at

前提条件

  • OS: Amazon Linux
  • webサーバ: Apache
  • webサーバ上のパス: /hg
  • Mercurialリポジトリ: /var/hg/repos/*

インストール

Mercurialをインストール。

yum install mercurial

Mercurialのリポジトリと設定ファイル等を置くためのディレクトリを作成。

mkdir -p /var/hg/repos
chown -R apache:apache /var/hg

hgweb.cgiをMercurialの公式リポジトリから取得して/var/hg/に置く。

ファイルを置いたらパーミッションを変更。

chmod +x /var/hg/hgweb.cgi

hgweb.cgiの設定ファイルを作成。

/var/hg/hgweb.config
[paths]
/hg = /var/hg/repos/*

[web]
encoding = UTF-8
/etc/httpd/conf.d/hg.conf
ScriptAlias /hg "/var/hg/hgweb.cgi"
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0