diff --git a/README.md b/README.md index 893a003..3428cfa 100644 --- a/README.md +++ b/README.md @@ -32,29 +32,6 @@ If you're using Xubuntu 14.04 LTS, you should have everything you need except $ 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 Xubuntu 14.04 LTS with [lighttpd](https://lighttpd.net) where the contest is at `/opt/moth/mycontest`: - -First, install lighttpd and backup the configuration: - - $ sudo apt-get install lighttpd -y - $ cp /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.orig - -Add `mod_cgi` to the `ServerModules` section, an alias, and CGI handling to `/etc/lighttpd/lighttpd.conf`: - - 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 ] - * Starting web server lighttpd [ OK ] - -Your server should now be serving up the contest! - How to set it up -------------------- @@ -81,11 +58,31 @@ After setting up (see above), just run Running It ------------- -Get your web server to serve up files from -`/opt/moth/mycontest/www`. +Get your web server to serve up your contest. 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` and `mothd` is running as user `moth`: -Then run `/opt/moth/mothd`. +First, install lighttpd and backup the configuration: + $ sudo apt-get install lighttpd -y + $ cp /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.orig + +Add `mod_cgi` to the `ServerModules` section, an alias, and CGI handling to `/etc/lighttpd/lighttpd.conf`: + + alias.url = ("/moth" => "/opt/moth/mycontest/www") + $HTTP["url"] =~ "/moth/" { + cgi.assign = (".cgi" => "/usr/bin/lua") + } + +Restart your server: + + $ sudo service lighttpd restart + * Stopping web server lighttpd [ OK ] + * Starting web server lighttpd [ OK ] + +Make sure user `moth` can access contest content and run the daemon. + + $ sudo chown -R moth:moth /opt/moth/mycontest + $ sudo -u moth /opt/moth/mothd Permissions ---------------- diff --git a/doc/writing-puzzles.md b/doc/writing-puzzles.md index 77b2975..b01ee5a 100644 --- a/doc/writing-puzzles.md +++ b/doc/writing-puzzles.md @@ -95,10 +95,10 @@ but non-listed files you would like. Special files are: -* index.mdwn: a plain text file formatted with +* index.md: a plain text file formatted with [markdown](http://daringfireball.net/projects/markdown/), displayed before the list of normal files in the puzzle directory. -* key: a plain text file with acceptable answers, one per line. Answers +* 00answers.txt: a plain text file with acceptable answers, one per line. Answers are matched exactly (ie. they are case-sensitive). * summary: a single line explaining to contest organizers what's going on in this puzzle. @@ -119,7 +119,7 @@ Let's make our 5-point sandwich question! > The key ingredients in a sandwich are: bread, spread, and filling. > When making a sandwich, you need to first put down one slice of bread, > then apply any spreads, and finally add filling. Popular fillings - > include cheese, sprouts, and cold cuts. When you are done, apply + > include cheese, sprouts, and cold cuts. When you are done, apply > another slice of bread on top, and optionally tie it together with > a fancy toothpick. >