You are not logged in.
Hello,
I'm trying to set up cgit on my archlinux server with the wiki article, and have a config file for cgit that I'm including in my main config:
ScriptAlias / "/usr/lib/cgit/cgit.cgi/"
Alias /cgit-css "/usr/share/webapps/cgit/"
<Directory "/usr/share/webapps/cgit/">
AllowOverride None
Options None
Require all granted
</Directory>
<Directory "/usr/lib/cgit/">
AllowOverride None
Options ExecCGI FollowSymlinks
Require all granted
</Directory>This loads cgit, but everything is unstyled. I have my cgitrc set like so:
#
# cgit config
#
#css=/cgit.css
#logo=/cgit.png
# Following lines work with the above Apache config
css=/cgit-css/cgit.css
logo=/cgit-css/cgit.png
# Following lines work with the above Lighttpd config
#css=/cgit/cgit.css
#logo=/cgit/cgit.png
# Allow http transport git clone
#enable-http-clone=0
# if you do not want that webcrawler (like google) index your site
robots=noindex, nofollow
# if cgit messes up links, use a virtual-root. For example, cgit.example.org/ has this value:
virtual-root=/
# repos
scan-path=/srv/git
enable-git-config=1
# Syntax highlighting
source-filter=/usr/lib/cgit/filters/syntax-highlighting-highlight.shWhen I try going to the hostname, it appears to work normally, except that it is unstyled. I suspect that the ScriptAlias for / is overriding the alias for /cgit-css because /cgit-css/cgit.css reveals a "repository not found" message that is also unstyled. The logo is also not working on all pages.
Is there a way to have it respect all other aliases and paths?
Thanks for the help.
Last edited by Toad39 (2021-04-17 22:43:45)
Offline
It appears that the directives that come first take higher priority, so I changed it to:
Alias /cgit-css "/usr/share/webapps/cgit/"
ScriptAlias / "/usr/lib/cgit/cgit.cgi/"
<Directory "/usr/share/webapps/cgit/">
AllowOverride None
Options None
Require all granted
</Directory>
<Directory "/usr/lib/cgit/">
AllowOverride None
Options ExecCGI FollowSymlinks
Require all granted
</Directory>and it worked fine.
Offline