start.d
├── 100-jetty.ini
├── 110-jmx.ini
├── 110-jsp.ini
├── 200-npn.ini
├── 200-ssl.ini
├── 210-http.ini
├── 210-spdy.ini
├── 500-deploy.ini
└── 900-demo.ini
start.available/
├── 000-jvm.ini
├── 110-logging.ini
├── 110-setuid.ini
├── 200-npn.ini
├── 200-ssl.ini
├── 210-https.ini
├── 210-spdy.ini
├── 300-plus.ini
├── 300-requestlog.ini
├── 400-debug.ini
├── 400-ipaccess.ini
├── 400-lowresources.ini
└── 400-stats.ini
To disable the demo webapps/realms all you need do now is:
rm start.d/900-demo.ini
To enable a feature like request logging you need only do:
cp start.available/300-requestlog.ini start.d
or use symbolic links if you are on a reasonable operating system.
More importantly, if you want to enable and configure something like HTTPS, you can either copy the corresponding available files (200-ssl.ini and 210-https.ini) and edit them or better yet create your own ini file with contents like:
#===========================================================
jetty.keystore=/etc/acme.keystore
jetty.keystore.password=MySecretPassword
jetty.keymanager.password=MySecretKeyPassword
jetty.truststore=/etc/acme.keystore
jetty.truststore.password=MySecretPassword
jetty.secure.port=443
jetty.https.port=8443
etc/jetty-ssl.xml
etc/jetty-https.xml
#===========================================================
This file can then just be dropped into start.d of a new jetty distribution and it will enable https using your certificate without the need to edit any jetty files at all.
To enable SPDY in a raw jetty distro you just need to do:
cp start.available/{200-npn.ini,200-ssl.ini,210-spdy.ini} start.d
This is split into 3 files (non, ssl and spdy) because ssl configuration may be shared between spdy and https, and in future npn configuration may be shared between spdy and http2 (or more likely replaced with ALPN). A bit of a pain but better than duplicate configuration.
Finally to make it possible to turn off the demo webapps easily, this branch does not put them into the webapps directory. Instead they go into the webapps.demo directory and if the 900-demo.ini file is in start.d it includes the etc/jetty-demo.xml file that defines an AppProvider that scans the webapps.demo directory. Remove 900-demo.ini and then jetty-demo.xml is not run and that directory is ignored!
I'd really like some feedback on these changes:
- Are they a good idea? how could they be improved?
- When should we do them? 9.0.x? or 9.1.x?
- Is the --download option safe. If it is safe, does it look dangerous enough to scare people?
- What other things can we do to make customising a standard distribution a bit easier?