Skip to content

Instantly share code, notes, and snippets.

@cdwilson
Created May 8, 2011 21:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save cdwilson/961709 to your computer and use it in GitHub Desktop.
Save cdwilson/961709 to your computer and use it in GitHub Desktop.
ubuntu apache config for git virtual host - /etc/apache2/conf.d/git
<VirtualHost *:80>
ServerName git.server
ServerAdmin webmaster@git.server
DocumentRoot /usr/share/gitweb
<Directory /usr/share/gitweb>
Options FollowSymLinks ExecCGI
AddHandler cgi-script cgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.* /index.cgi/$0 [L,PT]
</Directory>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment