1. Publishing Git Repository

    Installing tools

    To publish Git repositories on Debian, I do:

    # apt-get install git-daemon-run
    

    To enable web browsing of Git repositories, I do:

    # apt-get install gitweb libcgi-fast-perl libfcgi-procmanager-perl
    

    Note that I run gitweb as Fast CGI service.

    The package git-daemon-run is to invoke git-daemon. After installation of git-daemon-run and gitweb, I …

    more »
  2. Running CherryPy

    I put following lines in /etc/rc.local

    (cd /home/gniibe/www.gniibe.org &&
     su gniibe -c "./run-unguent.sh production")
    

    The shell script run-ungent.sh goes background by itself.

    more »
  3. Running port 8080 but accessing through port 80

    I run CherryPy on port 8080 with no root privilege. On the server, I also need to support access to port 80.

    Thus, I create a file named under /etc/network/if-up.d.

    # cat > /etc/network/if-up.d/system-iptables
    #!/bin/sh
    if [ $METHOD = "loopback" ]; then
      iptables -t nat -A PREROUTING …
    more »