Tuesday, 2017-11-07

New host

For a number of years my friend Thomas has graciously hosted this blog, a shell account, and a number of other things that are essential to the modern person (IMHO). However external circumstances will deprive me of this service, for which I am sorry, for Thomas has been the best sysadmin, and it’s been free!

I’ve shelled out a couple FIAT dollars a month for a “droplet” at Digital Ocean, and worked to transfer stuff from the old server to the new. These are some notes in case I have to do it again.

I chose Ubuntu as a distro because I like the Debian-based packaging.

Web hosting and Perl CGI

I installed Nginx because I’ve vaguely heard it’s “better”. Getting it to deal with CGI scripts in Perl was a bit fiddly but it worked out OK.

You need the fcgiwrap and spawn-fcgi packages.

The following addition was made to the server section of Nginx config for my site.

# we have separate htdocs and cgi-bin dirs under the gerikson.com dir
# this location is to make sure we can have a specific section for cgi-bin
location /cgi-bin/ {
    root /home/www/gerikson.com/;
    try_files $uri =404;
    gzip off;
    fastcgi_pass unix:/var/run/fcgiwrap.socket;
    fastcgi_index index.pl;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
}

Added packages

These are needed for some stuff I host

libcgi-pm-perl
libconfig-simple-perl
libdate-calc-perl
libdatetime-perl
libdbd-sqlite3-perl
libdbi-perl
libjson-perl
libnumber-format-perl
libstatistics-linefit-perl
libtext-csv-perl
libwww-perl
lynx
mutt
sqlite3
zip
perltidy
tree
cpanminus
perl-doc

These are needed for coding contests

libmath-bigint-gmp-perl
libmath-prime-util-gmp-perl

Python 3 stuff

python3
python-pip
virtualenv