Updates from July, 2009 Toggle Comment Threads | Keyboard Shortcuts

  • Jeff Forman 12:48 pm on July 21, 2009 Permalink
    Tags: git,   

    Configuring Gitweb on Ubuntu 

    I’ve been digging into Git more lately as a revision control system for my personal stuff, and wanted a nice GUI way to visualize diffs in a browser. Enter Gitweb. I poked around and found bits and pieces of tutorials, but nothing specific for Ubuntu. So I present to you my step-by-step on how I got it working viewing repos.

    • Ensure you have a working Apache setup first.
    • Install the package: aptitude install gitweb
    • Edit your /etc/gitweb.conf. The most important setting in there is $projectroot, which is the parent directory of the Git repos you want to share.
    • Since I am not using a specific name-based virtual host for this, I just added the gitweb directory setup to the base Apache config. Since Ubuntu includes the entire /etc/apache2/conf.d dir, I just stuck the below in /etc/apache2/conf.d/gitweb:

    RewriteEngine on
    RewriteRule ^/gitweb/([a-zA-Z0-9_\-]+\.git)/?(\?.*)?$ /cgi-bin/gitweb.cgi/$1 [L,PT]

    Alias /gitweb /scratch
    <Directory /scratch>
    Options Indexes FollowSymlinks ExecCGI
    DirectoryIndex /cgi-bin/gitweb.cgi
    AllowOverride None
    </Directory>

    /scratch, used above, is the parent directory of my Git repositories.

    • The only gotcha I found in the installation, is that the gitweb.cgi by default expects its media related files, CSS, gifs, etc in the root directory of the URL. For simplicities sake, I just copied these files, found inĀ  /usr/share/gitweb to /var/www. If you wish to change this, like most people will, just edit your gitweb.conf, which is found under /etc, and change the path to a place you expect the files to live.

    Hopefully this helps someone else setting up Gitweb. I am sure there are some security enhancements I could make surrounding Gitweb, but since this is a simple home installation, I did not go down that route.

     
    • kikito 3:35 am on August 2, 2010 Permalink | Reply

      Instead of copying the files around, you can try this:

      Alias /gitweb.css /usr/share/gitweb/gitweb.css
      Alias /git-logo.png /usr/share/gitweb/git-logo.png
      Alias /git-favicon.png /usr/share/gitweb/git-favicon.png

  • Jeff Forman 6:06 pm on July 2, 2009 Permalink
    Tags: reading   

    It only took me six months to read War and Peace. 

    Like a lot of people here in Boston, I take the T (subway) to and from work. From where I live along the Green line into Cambridge is about a forty-five minute jaunt. Some people read the newspaper, others read books, and others cram for a biology test they are on their way to. While I could get through the paper in a couple stops (for me, it’s currently an 18 stop trip from home to work) and then have nothing else to do. So I challenged myself, time to read one of those classic books that would keep me occupied for more than a week or two. It was in Costco back in January that I saw War and Peace, a recent edition released 1135 pages in length. It was cheap, I picked it up, and decided to challenge myself to see if I could read it, and actually get through it.

    Seven months later I am realizing that while I like to read, and it definitely keeps me occupied, I need to actually read books I like, and not just try to challenge myself. In short, the book is about the 1812 invasion of Russia by Napoleon. The language was well written, I found I could follow it, while not getting bogged down by the endless footnotes and end notes explaining popular culture back then. The only problem I had with the book was the near endless list of characters. I couldn’t keep track of a few characters, and follow their development before more people were added to the story.

    I bid you farewell War and Peace. You have lived in my messenger bag for 7 months along with my laptop and often my lunch to and from work. I’ll be glad to pawn this off onto someone who could enjoy it more than I could. I’m going back to my books that are a couple hundred pages, that while keep me occupied, are a bit more entertaining and to my liking.

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
shift + esc
cancel