mirror of https://github.com/dirtbags/moth.git
Moved lighttpd documentation to 'Running It' section of README. Updated writing-puzzles documentation to reflect required files 00answers.txt & 00author.txt
This commit is contained in:
parent
1bf6b5d725
commit
8c631296c0
49
README.md
49
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
|
$ 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
|
How to set it up
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
|
@ -81,11 +58,31 @@ After setting up (see above), just run
|
||||||
Running It
|
Running It
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
Get your web server to serve up files from
|
Get your web server to serve up your contest. Here's one way to do it
|
||||||
`/opt/moth/mycontest/www`.
|
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
|
Permissions
|
||||||
----------------
|
----------------
|
||||||
|
|
|
@ -95,10 +95,10 @@ but non-listed files you would like.
|
||||||
|
|
||||||
Special files are:
|
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
|
[markdown](http://daringfireball.net/projects/markdown/), displayed
|
||||||
before the list of normal files in the puzzle directory.
|
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).
|
are matched exactly (ie. they are case-sensitive).
|
||||||
* summary: a single line explaining to contest organizers what's going
|
* summary: a single line explaining to contest organizers what's going
|
||||||
on in this puzzle.
|
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.
|
> 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,
|
> When making a sandwich, you need to first put down one slice of bread,
|
||||||
> then apply any spreads, and finally add filling. Popular fillings
|
> 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
|
> another slice of bread on top, and optionally tie it together with
|
||||||
> a fancy toothpick.
|
> a fancy toothpick.
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue