diff --git a/README.md b/README.md index e6c527a..893a003 100644 --- a/README.md +++ b/README.md @@ -27,42 +27,34 @@ for details. Dependencies -------------------- -If you're using Ubuntu 14.04 LTS, you should have everything you need except +If you're using Xubuntu 14.04 LTS, you should have everything you need except [LUA](http://lua.org). $ sudo apt-get install lua5.2 -y -You'll also have to figure out a way to serve up CGI. Here's one way to do it -on Ubuntu 14.04 LTS with [lighttpd](https://lighttpd.net) where the contest -is at `/opt/moth/mycontest` accessible by user group `moth`, and the web -server is run as user `www-data`: +You'll also have to figure out a way to serve up CGI. Here's one way to do it +on Xubuntu 14.04 LTS with [lighttpd](https://lighttpd.net) where the contest is at `/opt/moth/mycontest`: -First, make sure your web server can access the contest files: +First, install lighttpd and backup the configuration: - $ sudo usermod -a -G moth www-data - -Next, install lighttpd and backup the configuration: - - $ sudo apt-get install lighttpd + $ sudo apt-get install lighttpd -y $ cp /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.orig -Add an entry for your contest to your `/etc/hosts`: +Add `mod_cgi` to the `ServerModules` section, an alias, and CGI handling to `/etc/lighttpd/lighttpd.conf`: - 127.0.0.1 mycontest - -Add a virtual host entry to `/etc/lighttpd/lighttpd.conf`: - - $HTTP["host"] == "mycontest" { - server.document-root = "/opt/moth/mycontest/www" - cgi.assign = ( ".cgi" => "/usr/bin/lua" ) + alias.url = ("/moth" => "/opt/moth/mycontest/www") + $HTTP["url"] =~ "/moth/" { + cgi.assign = (".cgi" => "/usr/bin/lua") } Finally, restart your server: $ sudo service lighttpd restart - * Stopping web server lighttpd [ OK ] + * Stopping web server lighttpd [ OK ] * Starting web server lighttpd [ OK ] +Your server should now be serving up the contest! + How to set it up -------------------- @@ -74,7 +66,7 @@ do the following: $ mkdir -p /opt/moth/mycontest $ ./install /opt/moth/mycontest $ cp mothd /opt/moth - + Yay, you've got it set up. @@ -84,7 +76,7 @@ Installing Puzzle Categories Puzzle categories are distributed in a different way than the server. After setting up (see above), just run $ /opt/moth/mycontest/bin/install-category /path/to/my/category - + Running It -------------