{
    "content": [
        {
            "type": "text",
            "text": "# gitweb (man)\n\n## NAME\n\ngitweb - Git web interface (web frontend to Git repositories)\n\n## SYNOPSIS\n\nTo get started with gitweb, run git-instaweb(1) from a Git repository. This would configure\nand start your web server, and run web browser pointing to gitweb.\n\n## DESCRIPTION\n\nGitweb provides a web interface to Git repositories. Its features include:\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **CONFIGURATION** (7 subsections)\n- **WEBSERVER CONFIGURATION** (2 subsections)\n- **ADVANCED WEB SERVER SETUP** (2 subsections)\n- **BUGS**\n- **SEE ALSO**\n- **GIT**\n- **NOTES**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "gitweb",
        "section": "",
        "mode": "man",
        "summary": "gitweb - Git web interface (web frontend to Git repositories)",
        "synopsis": "To get started with gitweb, run git-instaweb(1) from a Git repository. This would configure\nand start your web server, and run web browser pointing to gitweb.",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [
            {
                "name": "gitweb.conf",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/gitweb.conf/5/json"
            },
            {
                "name": "git-instaweb",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/git-instaweb/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 24,
                "subsections": []
            },
            {
                "name": "CONFIGURATION",
                "lines": 3,
                "subsections": [
                    {
                        "name": "Repositories",
                        "lines": 20
                    },
                    {
                        "name": "Projects list file format",
                        "lines": 49
                    },
                    {
                        "name": "Generating projects list using gitweb",
                        "lines": 24
                    },
                    {
                        "name": "Controlling access to Git repositories",
                        "lines": 40
                    },
                    {
                        "name": "Per-repository gitweb configuration",
                        "lines": 55
                    },
                    {
                        "name": "ACTIONS, AND URLS",
                        "lines": 40
                    },
                    {
                        "name": "Actions:",
                        "lines": 64
                    }
                ]
            },
            {
                "name": "WEBSERVER CONFIGURATION",
                "lines": 7,
                "subsections": [
                    {
                        "name": "Apache as CGI",
                        "lines": 41
                    },
                    {
                        "name": "Apache with FastCGI",
                        "lines": 17
                    }
                ]
            },
            {
                "name": "ADVANCED WEB SERVER SETUP",
                "lines": 3,
                "subsections": [
                    {
                        "name": "Single URL for gitweb and for fetching",
                        "lines": 43
                    },
                    {
                        "name": "Webserver configuration with multiple projects' root",
                        "lines": 147
                    }
                ]
            },
            {
                "name": "BUGS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "GIT",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "NOTES",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "gitweb - Git web interface (web frontend to Git repositories)\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "To get started with gitweb, run git-instaweb(1) from a Git repository. This would configure\nand start your web server, and run web browser pointing to gitweb.\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Gitweb provides a web interface to Git repositories. Its features include:\n\n•   Viewing multiple Git repositories with common root.\n\n•   Browsing every revision of the repository.\n\n•   Viewing the contents of files in the repository at any revision.\n\n•   Viewing the revision log of branches, history of files and directories, see what was\nchanged when, by who.\n\n•   Viewing the blame/annotation details of any file (if enabled).\n\n•   Generating RSS and Atom feeds of commits, for any branch. The feeds are auto-discoverable\nin modern web browsers.\n\n•   Viewing everything that was changed in a revision, and step through revisions one at a\ntime, viewing the history of the repository.\n\n•   Finding commits which commit messages matches given search term.\n\nSee http://repo.or.cz/w/git.git/tree/HEAD:/gitweb/ for gitweb source code, browsed using\ngitweb itself.\n",
                "subsections": []
            },
            "CONFIGURATION": {
                "content": "Various aspects of gitweb’s behavior can be controlled through the configuration file\ngitwebconfig.perl or /etc/gitweb.conf. See the gitweb.conf(5) for details.\n",
                "subsections": [
                    {
                        "name": "Repositories",
                        "content": "Gitweb can show information from one or more Git repositories. These repositories have to be\nall on local filesystem, and have to share common repository root, i.e. be all under a single\nparent repository (but see also \"Advanced web server setup\" section, \"Webserver configuration\nwith multiple projects' root\" subsection).\n\nour $projectroot = '/path/to/parent/directory';\n\n\nThe default value for $projectroot is /pub/git. You can change it during building gitweb via\nGITWEBPROJECTROOT build configuration variable.\n\nBy default all Git repositories under $projectroot are visible and available to gitweb. The\nlist of projects is generated by default by scanning the $projectroot directory for Git\nrepositories (for object databases to be more exact; gitweb is not interested in a working\narea, and is best suited to showing \"bare\" repositories).\n\nThe name of the repository in gitweb is the path to its $GITDIR (its object database)\nrelative to $projectroot. Therefore the repository $repo can be found at\n\"$projectroot/$repo\".\n"
                    },
                    {
                        "name": "Projects list file format",
                        "content": "Instead of having gitweb find repositories by scanning filesystem starting from $projectroot,\nyou can provide a pre-generated list of visible projects by setting $projectslist to point\nto a plain text file with a list of projects (with some additional info).\n\nThis file uses the following format:\n\n•   One record (for project / repository) per line; does not support line continuation\n(newline escaping).\n\n•   Leading and trailing whitespace are ignored.\n\n•   Whitespace separated fields; any run of whitespace can be used as field separator (rules\nfor Perl’s \"split(\" \", $line)\").\n\n•   Fields use modified URI encoding, defined in RFC 3986, section 2.1 (Percent-Encoding), or\nrather \"Query string encoding\" (see\nhttps://en.wikipedia.org/wiki/Querystring#URLencoding), the difference being that SP (\"\n\") can be encoded as \"+\" (and therefore \"+\" has to be also percent-encoded).\n\nReserved characters are: \"%\" (used for encoding), \"+\" (can be used to encode SPACE), all\nwhitespace characters as defined in Perl, including SP, TAB and LF, (used to separate\nfields in a record).\n\n•   Currently recognized fields are:\n\n<repository path>\npath to repository GITDIR, relative to $projectroot\n\n<repository owner>\ndisplayed as repository owner, preferably full name, or email, or both\n\nYou can generate the projects list index file using the projectindex action (the TXT link on\nprojects list page) directly from gitweb; see also \"Generating projects list using gitweb\"\nsection below.\n\nExample contents:\n\nfoo.git       Joe+R+Hacker+<joe@example.com>\nfoo/bar.git   O+W+Ner+<owner@example.org>\n\n\nBy default this file controls only which projects are visible on projects list page (note\nthat entries that do not point to correctly recognized Git repositories won’t be displayed by\ngitweb). Even if a project is not visible on projects list page, you can view it nevertheless\nby hand-crafting a gitweb URL. By setting $strictexport configuration variable (see\ngitweb.conf(5)) to true value you can allow viewing only of repositories also shown on the\noverview page (i.e. only projects explicitly listed in projects list file will be\naccessible).\n"
                    },
                    {
                        "name": "Generating projects list using gitweb",
                        "content": "We assume that GITWEBCONFIG has its default Makefile value, namely gitwebconfig.perl. Put\nthe following in gitwebmakeindex.perl file:\n\nreadconfigfile(\"gitwebconfig.perl\");\n$projectslist = $projectroot;\n\n\nThen create the following script to get list of project in the format suitable for\nGITWEBLIST build configuration variable (or $projectslist variable in gitweb config):\n\n#!/bin/sh\n\nexport GITWEBCONFIG=\"gitwebmakeindex.perl\"\nexport GATEWAYINTERFACE=\"CGI/1.1\"\nexport HTTPACCEPT=\"*/*\"\nexport REQUESTMETHOD=\"GET\"\nexport QUERYSTRING=\"a=projectindex\"\n\nperl -- /var/www/cgi-bin/gitweb.cgi\n\n\nRun this script and save its output to a file. This file could then be used as projects list\nfile, which means that you can set $projectslist to its filename.\n"
                    },
                    {
                        "name": "Controlling access to Git repositories",
                        "content": "By default all Git repositories under $projectroot are visible and available to gitweb. You\ncan however configure how gitweb controls access to repositories.\n\n•   As described in \"Projects list file format\" section, you can control which projects are\nvisible by selectively including repositories in projects list file, and setting\n$projectslist gitweb configuration variable to point to it. With $strictexport set,\nprojects list file can be used to control which repositories are available as well.\n\n•   You can configure gitweb to only list and allow viewing of the explicitly exported\nrepositories, via $exportok variable in gitweb config file; see gitweb.conf(5) manpage.\nIf it evaluates to true, gitweb shows repositories only if this file named by $exportok\nexists in its object database (if directory has the magic file named $exportok).\n\nFor example git-daemon(1) by default (unless --export-all option is used) allows pulling\nonly for those repositories that have git-daemon-export-ok file. Adding\n\nour $exportok = \"git-daemon-export-ok\";\n\nmakes gitweb show and allow access only to those repositories that can be fetched from\nvia git:// protocol.\n\n•   Finally, it is possible to specify an arbitrary perl subroutine that will be called for\neach repository to determine if it can be exported. The subroutine receives an absolute\npath to the project (repository) as its only parameter (i.e. \"$projectroot/$project\").\n\nFor example, if you use modperl to run the script, and have dumb HTTP protocol\nauthentication configured for your repositories, you can use the following hook to allow\naccess only if the user is authorized to read the files:\n\n$exportauthhook = sub {\nuse Apache2::SubRequest ();\nuse Apache2::Const -compile => qw(HTTPOK);\nmy $path = \"$[0]/HEAD\";\nmy $r    = Apache2::RequestUtil->request;\nmy $sub  = $r->lookupfile($path);\nreturn $sub->filename eq $path\n&& $sub->status == Apache2::Const::HTTPOK;\n};\n\n"
                    },
                    {
                        "name": "Per-repository gitweb configuration",
                        "content": "You can configure individual repositories shown in gitweb by creating file in the GITDIR of\nGit repository, or by setting some repo configuration variable (in GITDIR/config, see git-\nconfig(1)).\n\nYou can use the following files in repository:\n\nREADME.html\nA html file (HTML fragment) which is included on the gitweb project \"summary\" page inside\n<div> block element. You can use it for longer description of a project, to provide links\n(for example to project’s homepage), etc. This is recognized only if XSS prevention is\noff ($preventxss is false, see gitweb.conf(5)); a way to include a README safely when\nXSS prevention is on may be worked out in the future.\n\ndescription (or gitweb.description)\nShort (shortened to $projectslistdescriptionwidth in the projects list page, which is\n25 characters by default; see gitweb.conf(5)) single line description of a project (of a\nrepository). Plain text file; HTML will be escaped. By default set to\n\nUnnamed repository; edit this file to name it for gitweb.\n\nfrom the template during repository creation, usually installed in\n/usr/share/git-core/templates/. You can use the gitweb.description repo configuration\nvariable, but the file takes precedence.\n\ncategory (or gitweb.category)\nSinge line category of a project, used to group projects if\n$projectslistgroupcategories is enabled. By default (file and configuration variable\nabsent), uncategorized projects are put in the $projectlistdefaultcategory category.\nYou can use the gitweb.category repo configuration variable, but the file takes\nprecedence.\n\nThe configuration variables $projectslistgroupcategories and\n$projectlistdefaultcategory are described in gitweb.conf(5)\n\ncloneurl (or multiple-valued gitweb.url)\nFile with repository URL (used for clone and fetch), one per line. Displayed in the\nproject summary page. You can use multiple-valued gitweb.url repository configuration\nvariable for that, but the file takes precedence.\n\nThis is per-repository enhancement / version of global prefix-based @gitbaseurllist\ngitweb configuration variable (see gitweb.conf(5)).\n\ngitweb.owner\nYou can use the gitweb.owner repository configuration variable to set repository’s owner.\nIt is displayed in the project list and summary page.\n\nIf it’s not set, filesystem directory’s owner is used (via GECOS field, i.e. real name\nfield from getpwuid(3)) if $projectslist is unset (gitweb scans $projectroot for\nrepositories); if $projectslist points to file with list of repositories, then project\nowner defaults to value from this file for given repository.\n\nvarious gitweb.* config variables (in config)\nRead description of %feature hash for detailed list, and descriptions. See also\n\"Configuring gitweb features\" section in gitweb.conf(5)\n"
                    },
                    {
                        "name": "ACTIONS, AND URLS",
                        "content": "Gitweb can use pathinfo (component) based URLs, or it can pass all necessary information via\nquery parameters. The typical gitweb URLs are broken down in to five components:\n\n.../gitweb.cgi/<repo>/<action>/<revision>:/<path>?<arguments>\n\n\n\nrepo\nThe repository the action will be performed on.\n\nAll actions except for those that list all available projects, in whatever form, require\nthis parameter.\n\naction\nThe action that will be run. Defaults to projectslist if repo is not set, and to summary\notherwise.\n\nrevision\nRevision shown. Defaults to HEAD.\n\npath\nThe path within the <repository> that the action is performed on, for those actions that\nrequire it.\n\narguments\nAny arguments that control the behaviour of the action.\n\nSome actions require or allow to specify two revisions, and sometimes even two pathnames. In\nmost general form such pathinfo (component) based gitweb URL looks like this:\n\n.../gitweb.cgi/<repo>/<action>/<revisionfrom>:/<pathfrom>..<revisionto>:/<pathto>?<arguments>\n\n\nEach action is implemented as a subroutine, and must be present in %actions hash. Some\nactions are disabled by default, and must be turned on via feature mechanism. For example to\nenable blame view add the following to gitweb configuration file:\n\n$feature{'blame'}{'default'} = [1];\n\n"
                    },
                    {
                        "name": "Actions:",
                        "content": "The standard actions are:\n\nprojectlist\nLists the available Git repositories. This is the default command if no repository is\nspecified in the URL.\n\nsummary\nDisplays summary about given repository. This is the default command if no action is\nspecified in URL, and only repository is specified.\n\nheads, remotes\nLists all local or all remote-tracking branches in given repository.\n\nThe latter is not available by default, unless configured.\n\ntags\nList all tags (lightweight and annotated) in given repository.\n\nblob, tree\nShows the files and directories in a given repository path, at given revision. This is\ndefault command if no action is specified in the URL, and path is given.\n\nblobplain\nReturns the raw data for the file in given repository, at given path and revision. Links\nto this action are marked raw.\n\nblobdiff\nShows the difference between two revisions of the same file.\n\nblame, blameincremental\nShows the blame (also called annotation) information for a file. On a per line basis it\nshows the revision in which that line was last changed and the user that committed the\nchange. The incremental version (which if configured is used automatically when\nJavaScript is enabled) uses Ajax to incrementally add blame info to the contents of given\nfile.\n\nThis action is disabled by default for performance reasons.\n\ncommit, commitdiff\nShows information about a specific commit in a repository. The commit view shows\ninformation about commit in more detail, the commitdiff action shows changeset for given\ncommit.\n\npatch\nReturns the commit in plain text mail format, suitable for applying with git-am(1).\n\ntag\nDisplay specific annotated tag (tag object).\n\nlog, shortlog\nShows log information (commit message or just commit subject) for a given branch\n(starting from given revision).\n\nThe shortlog view is more compact; it shows one commit per line.\n\nhistory\nShows history of the file or directory in a given repository path, starting from given\nrevision (defaults to HEAD, i.e. default branch).\n\nThis view is similar to shortlog view.\n\nrss, atom\nGenerates an RSS (or Atom) feed of changes to repository.\n"
                    }
                ]
            },
            "WEBSERVER CONFIGURATION": {
                "content": "This section explains how to configure some common webservers to run gitweb. In all cases,\n/path/to/gitweb in the examples is the directory you ran installed gitweb in, and contains\ngitwebconfig.perl.\n\nIf you’ve configured a web server that isn’t listed here for gitweb, please send in the\ninstructions so they can be included in a future release.\n",
                "subsections": [
                    {
                        "name": "Apache as CGI",
                        "content": "Apache must be configured to support CGI scripts in the directory in which gitweb is\ninstalled. Let’s assume that it is /var/www/cgi-bin directory.\n\nScriptAlias /cgi-bin/ \"/var/www/cgi-bin/\"\n\n<Directory \"/var/www/cgi-bin\">\nOptions Indexes FollowSymlinks ExecCGI\nAllowOverride None\nOrder allow,deny\nAllow from all\n</Directory>\n\n\nWith that configuration the full path to browse repositories would be:\n\nhttp://server/cgi-bin/gitweb.cgi\n\nApache with modperl, via ModPerl::Registry\nYou can use modperl with gitweb. You must install Apache::Registry (for modperl 1.x) or\nModPerl::Registry (for modperl 2.x) to enable this support.\n\nAssuming that gitweb is installed to /var/www/perl, the following Apache configuration (for\nmodperl 2.x) is suitable.\n\nAlias /perl \"/var/www/perl\"\n\n<Directory \"/var/www/perl\">\nSetHandler perl-script\nPerlResponseHandler ModPerl::Registry\nPerlOptions +ParseHeaders\nOptions Indexes FollowSymlinks +ExecCGI\nAllowOverride None\nOrder allow,deny\nAllow from all\n</Directory>\n\n\nWith that configuration the full path to browse repositories would be:\n\nhttp://server/perl/gitweb.cgi\n"
                    },
                    {
                        "name": "Apache with FastCGI",
                        "content": "Gitweb works with Apache and FastCGI. First you need to rename, copy or symlink gitweb.cgi to\ngitweb.fcgi. Let’s assume that gitweb is installed in /usr/share/gitweb directory. The\nfollowing Apache configuration is suitable (UNTESTED!)\n\nFastCgiServer /usr/share/gitweb/gitweb.cgi\nScriptAlias /gitweb /usr/share/gitweb/gitweb.cgi\n\nAlias /gitweb/static /usr/share/gitweb/static\n<Directory /usr/share/gitweb/static>\nSetHandler default-handler\n</Directory>\n\n\nWith that configuration the full path to browse repositories would be:\n\nhttp://server/gitweb\n"
                    }
                ]
            },
            "ADVANCED WEB SERVER SETUP": {
                "content": "All of those examples use request rewriting, and need modrewrite (or equivalent; examples\nbelow are written for Apache).\n",
                "subsections": [
                    {
                        "name": "Single URL for gitweb and for fetching",
                        "content": "If you want to have one URL for both gitweb and your http:// repositories, you can configure\nApache like this:\n\n<VirtualHost *:80>\nServerName    git.example.org\nDocumentRoot  /pub/git\nSetEnv        GITWEBCONFIG   /etc/gitweb.conf\n\n# turning on mod rewrite\nRewriteEngine on\n\n# make the front page an internal rewrite to the gitweb script\nRewriteRule ^/$  /cgi-bin/gitweb.cgi\n\n# make access for \"dumb clients\" work\nRewriteRule ^/(.*\\.git/(?!/?(HEAD|info|objects|refs)).*)?$ \\\n/cgi-bin/gitweb.cgi%{REQUESTURI}  [L,PT]\n</VirtualHost>\n\n\nThe above configuration expects your public repositories to live under /pub/git and will\nserve them as http://git.domain.org/dir-under-pub-git, both as clonable Git URL and as\nbrowseable gitweb interface. If you then start your git-daemon(1) with --base-path=/pub/git\n--export-all then you can even use the git:// URL with exactly the same path.\n\nSetting the environment variable GITWEBCONFIG will tell gitweb to use the named file (i.e.\nin this example /etc/gitweb.conf) as a configuration for gitweb. You don’t really need it in\nabove example; it is required only if your configuration file is in different place than\nbuilt-in (during compiling gitweb) gitwebconfig.perl or /etc/gitweb.conf. See gitweb.conf(5)\nfor details, especially information about precedence rules.\n\nIf you use the rewrite rules from the example you might also need something like the\nfollowing in your gitweb configuration file (/etc/gitweb.conf following example):\n\n@stylesheets = (\"/some/absolute/path/gitweb.css\");\n$myuri    = \"/\";\n$homelink = \"/\";\n$perrequestconfig = 1;\n\n\nNowadays though gitweb should create HTML base tag when needed (to set base URI for relative\nlinks), so it should work automatically.\n"
                    },
                    {
                        "name": "Webserver configuration with multiple projects' root",
                        "content": "If you want to use gitweb with several project roots you can edit your Apache virtual host\nand gitweb configuration files in the following way.\n\nThe virtual host configuration (in Apache configuration file) should look like this:\n\n<VirtualHost *:80>\nServerName    git.example.org\nDocumentRoot  /pub/git\nSetEnv        GITWEBCONFIG  /etc/gitweb.conf\n\n# turning on mod rewrite\nRewriteEngine on\n\n# make the front page an internal rewrite to the gitweb script\nRewriteRule ^/$  /cgi-bin/gitweb.cgi  [QSA,L,PT]\n\n# look for a publicgit directory in unix users' home\n# http://git.example.org/~<user>/\nRewriteRule ^/\\~([^\\/]+)(/|/gitweb.cgi)?$   /cgi-bin/gitweb.cgi \\\n[QSA,E=GITWEBPROJECTROOT:/home/$1/publicgit/,L,PT]\n\n# http://git.example.org/+<user>/\n#RewriteRule ^/\\+([^\\/]+)(/|/gitweb.cgi)?$  /cgi-bin/gitweb.cgi \\\n[QSA,E=GITWEBPROJECTROOT:/home/$1/publicgit/,L,PT]\n\n# http://git.example.org/user/<user>/\n#RewriteRule ^/user/([^\\/]+)/(gitweb.cgi)?$ /cgi-bin/gitweb.cgi \\\n[QSA,E=GITWEBPROJECTROOT:/home/$1/publicgit/,L,PT]\n\n# defined list of project roots\nRewriteRule ^/scm(/|/gitweb.cgi)?$ /cgi-bin/gitweb.cgi \\\n[QSA,E=GITWEBPROJECTROOT:/pub/scm/,L,PT]\nRewriteRule ^/var(/|/gitweb.cgi)?$ /cgi-bin/gitweb.cgi \\\n[QSA,E=GITWEBPROJECTROOT:/var/git/,L,PT]\n\n# make access for \"dumb clients\" work\nRewriteRule ^/(.*\\.git/(?!/?(HEAD|info|objects|refs)).*)?$ \\\n/cgi-bin/gitweb.cgi%{REQUESTURI}  [L,PT]\n</VirtualHost>\n\n\nHere actual project root is passed to gitweb via GITWEBPROJECTROOT environment variable\nfrom a web server, so you need to put the following line in gitweb configuration file\n(/etc/gitweb.conf in above example):\n\n$projectroot = $ENV{'GITWEBPROJECTROOT'} || \"/pub/git\";\n\n\nNote that this requires to be set for each request, so either $perrequestconfig must be\nfalse, or the above must be put in code referenced by $perrequestconfig;\n\nThese configurations enable two things. First, each unix user (<user>) of the server will be\nable to browse through gitweb Git repositories found in ~/publicgit/ with the following url:\n\nhttp://git.example.org/~<user>/\n\nIf you do not want this feature on your server just remove the second rewrite rule.\n\nIf you already use ‘moduserdir` in your virtual host or you don’t want to use the '~’ as\nfirst character, just comment or remove the second rewrite rule, and uncomment one of the\nfollowing according to what you want.\n\nSecond, repositories found in /pub/scm/ and /var/git/ will be accessible through\nhttp://git.example.org/scm/ and http://git.example.org/var/. You can add as many project\nroots as you want by adding rewrite rules like the third and the fourth.\n\nPATHINFO usage\nIf you enable PATHINFO usage in gitweb by putting\n\n$feature{'pathinfo'}{'default'} = [1];\n\n\nin your gitweb configuration file, it is possible to set up your server so that it consumes\nand produces URLs in the form\n\nhttp://git.example.com/project.git/shortlog/sometag\n\ni.e. without gitweb.cgi part, by using a configuration such as the following. This\nconfiguration assumes that /var/www/gitweb is the DocumentRoot of your webserver, contains\nthe gitweb.cgi script and complementary static files (stylesheet, favicon, JavaScript):\n\n<VirtualHost *:80>\nServerAlias git.example.com\n\nDocumentRoot /var/www/gitweb\n\n<Directory /var/www/gitweb>\nOptions ExecCGI\nAddHandler cgi-script cgi\n\nDirectoryIndex gitweb.cgi\n\nRewriteEngine On\nRewriteCond %{REQUESTFILENAME} !-f\nRewriteCond %{REQUESTFILENAME} !-d\nRewriteRule ^.* /gitweb.cgi/$0 [L,PT]\n</Directory>\n</VirtualHost>\n\n\nThe rewrite rule guarantees that existing static files will be properly served, whereas any\nother URL will be passed to gitweb as PATHINFO parameter.\n\nNotice that in this case you don’t need special settings for @stylesheets, $myuri and\n$homelink, but you lose \"dumb client\" access to your project .git dirs (described in \"Single\nURL for gitweb and for fetching\" section). A possible workaround for the latter is the\nfollowing: in your project root dir (e.g. /pub/git) have the projects named without a .git\nextension (e.g. /pub/git/project instead of /pub/git/project.git) and configure Apache as\nfollows:\n\n<VirtualHost *:80>\nServerAlias git.example.com\n\nDocumentRoot /var/www/gitweb\n\nAliasMatch ^(/.*?)(\\.git)(/.*)?$ /pub/git$1$3\n<Directory /var/www/gitweb>\nOptions ExecCGI\nAddHandler cgi-script cgi\n\nDirectoryIndex gitweb.cgi\n\nRewriteEngine On\nRewriteCond %{REQUESTFILENAME} !-f\nRewriteCond %{REQUESTFILENAME} !-d\nRewriteRule ^.* /gitweb.cgi/$0 [L,PT]\n</Directory>\n</VirtualHost>\n\n\nThe additional AliasMatch makes it so that\n\nhttp://git.example.com/project.git\n\nwill give raw access to the project’s Git dir (so that the project can be cloned), while\n\nhttp://git.example.com/project\n\nwill provide human-friendly gitweb access.\n\nThis solution is not 100% bulletproof, in the sense that if some project has a named ref\n(branch, tag) starting with git/, then paths such as\n\nhttp://git.example.com/project/command/abranch..git/abranch\n\nwill fail with a 404 error.\n"
                    }
                ]
            },
            "BUGS": {
                "content": "Please report any bugs or feature requests to git@vger.kernel.org[1], putting \"gitweb\" in the\nsubject of email.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "gitweb.conf(5), git-instaweb(1)\n\ngitweb/README, gitweb/INSTALL\n",
                "subsections": []
            },
            "GIT": {
                "content": "Part of the git(1) suite\n",
                "subsections": []
            },
            "NOTES": {
                "content": "1. git@vger.kernel.org\nmailto:git@vger.kernel.org\n\n\n\nGit 2.34.1                                   02/26/2026                                    GITWEB(1)",
                "subsections": []
            }
        }
    }
}