Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
git
提交
c3f0cadf
G
git
项目概览
李少辉-开发者
/
git
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
git
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c3f0cadf
编写于
8月 27, 2009
作者:
J
Junio C Hamano
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'wl/insta-mongoose'
* wl/insta-mongoose: Add support for the Mongoose web server.
上级
e7c693a8
0ded4758
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
53 addition
and
6 deletion
+53
-6
Documentation/git-instaweb.txt
Documentation/git-instaweb.txt
+1
-1
git-instaweb.sh
git-instaweb.sh
+52
-5
未找到文件。
Documentation/git-instaweb.txt
浏览文件 @
c3f0cadf
...
...
@@ -29,7 +29,7 @@ OPTIONS
The HTTP daemon command-line that will be executed.
Command-line options may be specified here, and the
configuration file will be added at the end of the command-line.
Currently
lighttpd, apache2
and webrick are supported.
Currently
apache2, lighttpd, mongoose
and webrick are supported.
(Default: lighttpd)
-m::
...
...
git-instaweb.sh
浏览文件 @
c3f0cadf
...
...
@@ -77,11 +77,30 @@ start_httpd () {
resolve_full_httpd
# don't quote $full_httpd, there can be arguments to it (-f)
case
"
$httpd
"
in
*
mongoose
*
)
#The mongoose server doesn't have a daemon mode so we'll have to fork it
$full_httpd
"
$fqgitdir
/gitweb/httpd.conf"
&
#Save the pid before doing anything else (we'll print it later)
pid
=
$!
if
test
$?
!=
0
;
then
echo
"Could not execute http daemon
$httpd
."
exit
1
fi
cat
>
"
$fqgitdir
/pid"
<<
EOF
$pid
EOF
;;
*
)
$full_httpd
"
$fqgitdir
/gitweb/httpd.conf"
if
test
$?
!=
0
;
then
echo
"Could not execute http daemon
$httpd
."
exit
1
fi
;;
esac
}
stop_httpd
()
{
...
...
@@ -308,6 +327,31 @@ EOF
fi
}
mongoose_conf
()
{
cat
>
"
$conf
"
<<
EOF
# Mongoose web server configuration file.
# Lines starting with '#' and empty lines are ignored.
# For detailed description of every option, visit
# http://code.google.com/p/mongoose/wiki/MongooseManual
root
$fqgitdir
/gitweb
ports
$port
index_files gitweb.cgi
#ssl_cert
$fqgitdir
/gitweb/ssl_cert.pem
error_log
$fqgitdir
/gitweb/error.log
access_log
$fqgitdir
/gitweb/access.log
#cgi setup
cgi_env PATH=/usr/local/bin:/usr/bin:/bin,GIT_DIR=
$GIT_DIR
,GIT_EXEC_PATH=
$GIT_EXEC_PATH
cgi_interp
$PERL
cgi_ext cgi,pl
# mimetype mapping
mime_types .gz=application/x-gzip,.tar.gz=application/x-tgz,.tgz=application/x-tgz,.tar=application/x-tar,.zip=application/zip,.gif=image/gif,.jpg=image/jpeg,.jpeg=image/jpeg,.png=image/png,.css=text/css,.html=text/html,.htm=text/html,.js=text/javascript,.c=text/plain,.cpp=text/plain,.log=text/plain,.conf=text/plain,.text=text/plain,.txt=text/plain,.dtd=text/xml,.bz2=application/x-bzip,.tbz=application/x-bzip-compressed-tar,.tar.bz2=application/x-bzip-compressed-tar
EOF
}
script
=
'
s#^(my|our) \$projectroot =.*#$1 \$projectroot = "'
$(
dirname
"
$fqgitdir
"
)
'";#;
s#(my|our) \$gitbin =.*#$1 \$gitbin = "'
$GIT_EXEC_PATH
'";#;
...
...
@@ -344,6 +388,9 @@ case "$httpd" in
webrick
)
webrick_conf
;;
*
mongoose
*
)
mongoose_conf
;;
*
)
echo
"Unknown httpd specified:
$httpd
"
exit
1
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录