Skip to content

Instantly share code, notes, and snippets.

@ur4ltz
Forked from ap/httpd-cgit.conf
Created April 14, 2019 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ur4ltz/b1b7369b612111a30cef6de38f9dcf30 to your computer and use it in GitHub Desktop.
Save ur4ltz/b1b7369b612111a30cef6de38f9dcf30 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