我混帐instaweb与内置Apache在我的Mac(运行狮子工作)如下:
- 作为根:
cd /usr/sbin; ln -s httpd apache2
- 作为根:编辑的/ usr /的libexec/git的核/ GIT-instaweb:添加这些行
LockFile "$fqgitdir/gitweb/$httpd_only/access.lock"
User UsernameForYourGitServer
行之后PidFile "$fqgitdir/pid"
- 最后,如你的git用户,cd到您的存储库,然后运行
git instaweb --httpd apache2 -m /usr/libexec/apache2
这甚至适用于您已经使用标准服务器的情况,即当您打开“Web共享”时。 gitweb服务器将是一个单独的进程,监听端口1234,而不是标准服务器使用的端口80。
要使用的launchd启动该服务器上创建一个文件/Library/LaunchDaemons/git-web.plist,就像这样:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>GitWeb</string>
<key>WorkingDirectory</key>
<string>/Wherever/Your/Repository/Is</string>
<key>ProgramArguments</key>
<array>
<string>git</string>
<string>instaweb</string>
<string>--httpd</string>
<string>apache2</string>
<string>-m</string>
<string>/usr/libexec/apache2</string>
</array>
<key>KeepAlive</key>
<true/>
</dict>
</plist>
我找不到任何解决这个问题为止。最好的转换工作是使用另一个支持服务器: httpd = webrick – Peiniau 2009-10-05 10:35:02