GITWEB.CONF(5) Git Manual GITWEB.CONF(5) (NAME) gitweb.conf - ( ) (SYNOPSIS) /etc/gitweb.conf, /etc/gitweb-common.conf, $GITWEBDIR/gitweb_config.perl (DESCRIPTION) CGI . "our $variable = value" "#" . perlsyn(1) . : # http://git.example.org # our $projectroot = "/srv/git"; # FHS our $site_name = 'Example.org >> Repos'; gitweb.cgi . CGI . CGI gitweb_config.perl -- (symlinks) . : "Per-repository gitweb configuration" gitweb(1) . (DISCUSSION) : o ( ) o ( /etc/gitweb-common.conf) o ( gitweb_config.perl ) ( /etc/gitweb.conf). (override) . Makefile GITWEB_CONFIG_COMMON GITWEB_CONFIG_SYSTEM GITWEB_CONFIG . : GITWEB_CONFIG_COMMON GITWEB_CONFIG_SYSTEM GITWEB_CONFIG. ( ) . our ( "our $variable = ;") . read_config_file() (include) . Gitolite ( ) /etc/gitweb-gitolite.conf. read_config_file("/etc/gitweb-gitolite.conf"); . read_config_file() . . . %features ( << >> ). (CONFIGURATION VARIABLES) ( CGI ) -- . INSTALL . (Location of repositories) . "Repositories" gitweb(1) . $projectroot $projectroot/$project . $GITWEB_PROJECTROOT . . $projectroot "/srv/git" : our $projectroot = "/srv/git"; http://git.example.com/gitweb.cgi?p=foo/bar.git path_info http://git.example.com/gitweb.cgi/foo/bar.git /srv/git/foo/bar.git . $projects_list . : SP makefile GITWEB_LIST . $projectroot . $project_maxdepth $projects_list . $project_maxdepth $projectroot ( ) $projectroot $project_maxdepth . MacOS X . . GITWEB_PROJECT_MAXDEPTH 2007 . $export_ok ( ) . (true) . GITWEB_EXPORT_OK . GIT_DIR . git-daemon(1) git-daemon-export-ok --export-all . . $export_auth_hook . (true) $export_ok $projects_list $projects_maxdepth . : our $export_auth_hook = sub { return -e "$_[0]/git-daemon-export-ok"; }; $export_ok : our $export_ok = "git-daemon-export-ok"; ( ) . "Controlling access to Git repositories" gitweb(1) . $strict_export (overview) . $export_ok . $projects_list . GITWEB_STRICT_EXPORT . ( $projects_list ) . (Finding files) . . $GIT . $GIT_BINDIR/git, $(bindir)/git . "/usr/bin/git" . PATH "git" . . ( ) . $mimetypes_file MIME ( ) /etc/mime.types . CGI. /etc/mime.types ( ) . mimetypes mimetype . . $highlight_bin highlight ( http://andre-simon.de/zip/download.php ). highlight PATH highlight . highlight . : "highlight" . . . %highlight_basename %highlight_ext ( "Makefile") ( "sh") . --syntax "highlight" . Shebang "highlight" ( "#!/bin/bash"). highlight /etc/highlight/filetypes.conf . "phtml" PHP : our %highlight_ext; $highlight_ext{'phtml'} = 'php'; (Links and their targets) : ( ) ( ) . @stylesheets. @stylesheets URI CSS ( URI ). "gitweb.css" . site push @stylesheets, "gitweb-site.css"; . URI . URI . URI makefile GITWEB_CSS . static/gitweb.css ( static/gitweb.min.css CSSMIN CSS ). : $stylesheet . $stylesheet CSS . $logo git-logo.png URI () 72x27 . Atom . URI ( ) . GITWEB_LOGO . static/git-logo.png . $favicon git-favicon.png URI () "image/png" . URL . URI . GITWEB_FAVICON . static/git-favicon.png . $javascript gitweb.js URI . URI . GITWEB_JS . static/gitweb.js static/gitweb.min.js JSMIN . . $home_link ( "breadcrumbs"). URI ( $my_uri $my_uri "/"). $home_link_str << >> $home_link ( ). : / / . GITWEB_HOME_LINK_STR . "projects" . . HTML . @extra_breadcrumbs <<>> . ( $home_link_str) ( $home_link) . "home / dev / projects / ..." "projects" . our @extra_breadcrumbs = ( [ 'home' => 'https://www.example.org' ], [ 'dev' => 'https://dev.example.org' ], ); $logo_url, $logo_label URI (title) ( ). https://git-scm.com https://www.kernel.org . (Changing gitweb's look) . ( ) . $site_name . . SERVER_NAME CGI "$SERVER_NAME Git" "Untitled Git" ( ). GITWEB_SITENAME . . $site_html_head_string HTML . GITWEB_SITE_HTML_HEAD_STRING . . $site_header HTML . gitweb.cgi . GITWEB_SITE_HEADER . . $site_footer HTML . gitweb.cgi . GITWEB_SITE_FOOTER . . $home_text HTML ( "projects_list") . gitweb.cgi . GITWEB_HOMETEXT . indextext.html . $projects_list_description_width ( / ) "Description" . ( ) title ( ). 25 . $default_projects_order ( "o" URL ) . "none" () "project" ( $projectroot) "descr" ( ) "owner" () "age" ( ). "project" . . (Changing gitweb's behavior) . $default_blob_plain_mimetype mimetype blob_plain () mimetype "text/plain". mimetype $mimetypes_file ( ) /etc/mime.types ( mime.types(5) ). $default_text_plain_charset (charset) . . . $fallback_encoding UTF-8 . "utf-8" . Encoding::Supported(3pm) . "latin1" "iso-8859-1" . @diff_opts git-diff git-diff-tree. ('-M') ('-C') ('-C', '-C') () . (CPU) . ('-C') ('-B') . (Some optional features and policies) %feature . ( XSS "summary" ). @git_base_url_list URL . URL . "$git_base_url/$project" . URL ( git:// http://). $GIT_DIR/cloneurl gitweb.url . @git_base_url_list . ( ) GITWEB_BASE_URL . () . URL ( ) . $projects_list_group_categories . $GIT_DIR/category gitweb.category . ( 0 ). $project_list_default_category . . $projects_list_group_categories (true) . "" ( ) . $prevent_xss (XSS) . true . ( 0 ). $maxload . "503 Service Unavailable" . 0 . /proc/loadavg -- -- . $maxload (undef) . 300 . $omit_age_column . I/O (fork) . $omit_owner . $per_request_config . . : our $per_request_config = sub { $ENV{GL_USER} = $cgi->remote_user || "gitweb"; }; $per_request_config . . ( 1 ). : $my_url $my_uri $base_url true . ( mod_perl FastCGI Plackup) . (Other variables) () . $version gitweb.cgi gitweb.perl . our $version .= " with caching"; (caching) . "generator" HTML . $my_url, $my_uri . $per_request_config . $base_url URL ( $logo $favicon @stylesheets ) URL PATH_INFO . ( $my_uri "/"). $per_request_config . (CONFIGURING GITWEB FEATURES) %feature ( ) . . %feature : "" => { "sub" => , "override" => , "default" => [ ... ] }, . %feature : "" => { "override" => 0, "default" => [ ... ] }, 'sub' . : default ( ) ( ) ( ) . 'default' . [1] [0] . "blame" <<>> . ( ) [] . override (true) ( /) . "" gitweb. . . sub . . . %feature (Features in %feature) %feature . gitweb.cgi . blame "blame" "blame_incremental" blob git-blame(1) . . gitweb.blame () . snapshot "snapshot" git-archive(1) . . 'default' snapshot %known_snapshot_formats . "tgz" "tbz2" "txz" ( tar gzip/bzip2/xz) "zip" . "tgz" . gitweb.snapshot "none" snapshot . . grep grep () git-grep(1) . . . gitweb.grep () . pickaxe pickaxe . "blame" . . pickaxe git-log(1) ( -S pickaxe gitdiffcore(7) ). gitweb.pickaxe () . show-sizes blob ( ) "tree" ls -l -l git-ls-tree(1) . I/O . . gitweb.showSizes () . patches "patches" ( ) git-format-patch(1) . "patches" . default 0 . 16 . gitweb.patches () . avatar ( ). "shortlog" "commit" . "gravatar" "picon". (default ). . gitweb/INSTALL . gitweb.avatar . %avatar_size ("default" "log" "shortlog" "double" "commit" "commitdiff" "tag"). ( CSS @stylesheets) . email-privacy HTML . / . . robots.txt . . . . highlight "blob". $highlight_bin ( << >> ) . gitweb.highlight () . remote_heads ( / remote-tracking) "heads" . . git-instaweb(1) . gitweb.remote_heads () . . search --author --committer --grep git-log(1) . . . forks ( ) . $projname.git $projname/ . '+' $projname "forks" ( $projname/) . "forks" . ($projects_list ) . . actions . . "default" `("