isotoma/isotoma.recipe.apache — Issue #1: singlepage->emergency
Author: alex2
Created: 2011-12-21 18:22:57+00:00
State: open

At the moment, creating an emergency apache configuration using this recipe goes as follows:

```ini
[buildout]
parts = apache-emergency

[apache-emergency]
recipe = isotoma.recipe.apache:singlepage
interfaces =
*:80:www.example.com:false
*:443:www.example.co.uk:true
htdocs = ${buildout:directory}/src/emergency
access_log = /var/ACCESSLOG
error_log = /var/ERRORLOG
file_path = ${buildout:directory}/src/emergency/index.html
namevirtualhost = VIRTUALHOST
sslcert = ${buildout:directory}/cert.crt
sslkey = ${buildout:directory}/key.key
```

I do not like this. The interfaces *thing* is horrible, ssl configuration is shared between all sites which makes the sitename-in-interfaces fairly useless, and I feel most importantly, it's more difficult to get values from my already-defined non-emergency parts.

I propose that instead of the above, we just do one emergency page per site per stanza, as follows:

```ini
[buildout]
parts =
apache
apache-emergency

[apache]
recipe = isotoma.recipe.apache:wsgi
interface = 127.0.0.1
namevirtualhost = on
ssl = on
sslcert = /foo/bar/baz.crt
sslkey = /foo/bar/baz.key

[apache-emergency]
<=apache
recipe = isotoma.recipe.apache:emergency
emergency-root = /var/www
emergency-page = index.html
```

This way, with very minimal duplication, we have a clearer configuration, potentially less duplication, and more control over what gets an emergency page and where.

The new method could be called *emergency*, rather than *singlepage* to avoid confusion.

Le thoughts?