--- /dev/null
+# path to git projects (<project>.git)
+$projectroot = "/home/blogmistress/gitweb-projects";
+
+# 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;
+
+# Absolute (not relative) paths, and under /blog/gitweb-static rather than
+# gitweb's default "static/..." -- gitweb here uses query-string URLs
+# (?p=repo.git;a=summary), not PATH_INFO style, so it never emits a <base
+# href> to fix up relative resolution. A relative "static/gitweb.css"
+# resolves against the current page's own path (e.g. /blog/source/), landing
+# on /blog/source/static/gitweb.css, which nginx routes into the gitweb.cgi
+# fastcgi handler (there's no location more specific than /blog/source), and
+# gitweb silently ignores the bogus extra path and re-renders the project
+# list as HTML -- so the "stylesheet" comes back as text/html and never
+# applies. Absolute paths sidestep this regardless of gitweb's URL style.
+@stylesheets = ("/blog/gitweb-static/gitweb.css");
+$javascript = "/blog/gitweb-static/gitweb.js";
+$logo = "/blog/gitweb-static/git-logo.png";
+$favicon = "/blog/gitweb-static/git-favicon.png";
+
+# git-diff-tree(1) options to use for generated patches
+#@diff_opts = ("-M");
+@diff_opts = ();
fastcgi_pass unix:/run/fcgiwrap.socket;
}
- location /blog/static { # gitweb static files
+ # gitweb's own CSS/JS/logo/favicon. Named gitweb-static (not the
+ # generic-sounding static) so it can't be mistaken for a general
+ # blog static-asset path; gitweb.conf (see provisioning/gitweb.conf)
+ # points @stylesheets/$javascript/$logo/$favicon at this path
+ # absolutely, rather than relying on gitweb's relative default.
+ location /blog/gitweb-static {
alias /usr/share/gitweb/static/;
try_files $uri $uri/ =404;
}