{
  admin off
}

http:// {
  route {
    root * /var/lib/git/static
    file_server {
      pass_thru
    }
  }

  route {
    root * /usr/share/webapps/cgit
    file_server {
      pass_thru
    }
  }

  # you may want to handle /assets/md.css (for example doing a rewrite to /cgit-assets.git/plain/markdown.css) if you use the default markdown handler

  reverse_proxy unix//run/fcgiwrap/fcgiwrap.sock {
    transport fastcgi {
      env DOCUMENT_ROOT /usr/share/webapps/cgit
      env SCRIPT_FILENAME /usr/share/webapps/cgit/cgit.cgi
      # see https://caddyserver.com/docs/json/apps/http/#docs
      # env PATH_INFO {http.request.uri.path}
      # env QUERY_STRING {http.request.uri.query}
    }
  }
}