Skip to content

Instantly share code, notes, and snippets.

@ap
Created March 31, 2009 12:22
Show Gist options
  • Save ap/88168 to your computer and use it in GitHub Desktop.
Save ap/88168 to your computer and use it in GitHub Desktop.
cgit clean URLs Apache config
# cgit setup for Apache that results in completely clean URLs, ie.
# visiting http://git.example.org/ will produce the cgit index page
<VirtualHost *>
# this part is stand fare
ServerName git.example.org
DocumentRoot /var/www/htdocs/cgit/
<Directory "/var/www/htdocs/cgit/">
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
</Directory>
# this part is the magic
Alias /cgit.png /var/www/htdocs/cgit/cgit.png
Alias /cgit.css /var/www/htdocs/cgit/cgit.css
Alias / /var/www/htdocs/cgit/cgit.cgi/
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment