大佬教程收集整理的这篇文章主要介绍了麻烦使用gitweb与nginx,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我在/ home / raynes / pubgit /中的目录中有一个git存储库.我正在尝试使用gitweb为它提供Web界面.我使用Nginx作为我的web服务器用于其他一切,所以我真的不想仅仅为此使用另一个.
我主要遵循这个指南:http://michalbugno.PL/en/blog/gitweb-nginx,这是我可以通过谷歌找到的唯一指南,并且是最近的. fcgiwrap显然不在Lucid Lynx的存储库中,所以我手动安装它.我通过spawn-fcgi生成实例:
spawn-fcgi -f /usr/local/sbin/fcgiwrap -a 127.0.0.1 -p 9001
这一切都很好.我的/etc/gitweb.conf如下:
# path to git projects (ject>.git) $projectroot="/home/raynes/pubgit";
$my_uri = "http://mc.raynes.me";
$home_link = "http://mc.raynes.me/";
# directory to use for temp files
$git_temp = "/tmp";
# target of the home link on top of all pages
#$home_link = $my_uri || "/";
# html text to include at home page
$home_text = "indextext.html";
# file with project list; by default,simply scan the projectroot dir.
$projects_list = $projectroot;
# stylesheet to use
$stylesheet = "/gitweb/gitweb.css";
# logo to use
$logo = "/gitweb/git-logo.png";
# the 'favicon'
$favicon = "/gitweb/git-favicon.png";
我的Nginx服务器配置如下:
server {
listen 80;
server_name mc.raynes.me;
LOCATIOn / {
root /usr/share/gitweb;
if (!-f $request_fileName) {
fastcgi_pass 127.0.0.1:9001;
}
fastcgi_index index.cgi;
fastcgi_param SCRIPT_FILename /scripts$fastcgi_script_name;
include fastcgi_params;
}
}
这里唯一的区别是我将fastcgi_pass设置为127.0.0.1:9001.当我去http://mc.raynes.me时,我会看到一个只是简单地说“403”而没有其他内容的页面.我没有丝毫的线索我做错了什么.
有任何想法吗?
fastcgi_param SCRIPT_FILename /usr/share/gitweb/gitweb.cgi;
如果仍然有错误,您可能还需要指定Gitweb配置文件的完整路径:
fastcgi_param GITWEB_CONfig /etc/conf.d/gitweb.conf;
以上是大佬教程为你收集整理的麻烦使用gitweb与nginx全部内容,希望文章能够帮你解决麻烦使用gitweb与nginx所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。