我无法使用 gitweb 突出显示语法。我已经坚持了好几天了,感谢任何帮助。我做了很多研究并尝试了很多东西,但似乎没有任何效果。我可以在没有语法突出显示的情况下查看 gitweb。
# cat /etc/centos-release
CentOS release 6.4 (Final)
# rpm -qa | grep highlight
highlight-3.8-1.el6.x86_64
# rpm -qa | grep gitweb
gitweb-1.7.1-3.el6_4.1.noarch
# rpm -qa | grep git
git-1.7.1-3.el6_4.1.x86_64
/etc/httpd/conf.d/git.conf
Alias /git /var/www/git
# Suexec setup
SuexecUserGroup gitolite gitolite
# Set up appropriate GIT environments
SetEnv GIT_PROJECT_ROOT /var/lib/gitolite/repositories
SetEnv GIT_HTTP_EXPORT_ALL
# Set up appropriate gitolite environment
SetEnv GITOLITE_HTTP_HOME /var/lib/gitolite
# To serve gitweb at the same url, use a ScriptAliasMatch to
# only those URLs that git http-backend can handle, and
# forward the rest to gitweb:
ScriptAliasMatch \
"(?x)^/(.*/(HEAD | \
info/refs | \
objects/(info/[^/]+ | \
[0-9a-f]{2}/[0-9a-f]{38} | \
pack/pack-[0-9a-f]{40}\.(pack|idx)) | \
git-(upload|receive)-pack))$" \
/var/www/cgi-bin/gitolite-suexec-wrapper.sh/$1
# Make sure we can execute gitweb okay
<Directory "/var/www/git">
Options ExecCGI
AllowOverride None
AddHandler cgi-script .cgi
DirectoryIndex gitweb.cgi
Order allow,deny
Allow from all
</Directory>
# We need gl-auth-command executable
<Directory "/var/www/cgi-bin">
<Files "gitolite-suexec-wrapper.sh">
Order allow,deny
Allow from all
</Files>
</Directory>
/etc/gitweb.conf
# cat /etc/gitweb.conf | grep highlight
$highlight_bin = "/usr/bin/highlight";
$feature{'highlight'}{'default'} = [1];
我还安装了 kogakure gitweb 主题。https://github.com/kogakure/gitweb-theme