Restricting Solr with Jetty to localhost

If you want to try Apache Solr, the easiest way to get started is to use the example the comes with the download. Just run java -jar start.jar and you can start searching like a pro.

However, the integrated Jetty server is configured to bind to port 8983 on all IP adresses by default. This configuration is unsafe: anyone could clear your whole Solr index!

It is a good idea to let the server listen only on localhost, unless your server is in a private network. A quick solution is to set the system properties jetty.host and jetty.port on startup, e.g. like that:

java -Djetty.host=127.0.0.1 -Djetty.port=1337 -jar start.jar

Alternatively, you can edit the configuration at example/etc/jetty.xml. Look for these lines:

<Set name="host"><SystemProperty name="jetty.host" /></Set>¬
<Set name="port"><SystemProperty name="jetty.port" default="8983"/></Set>

It’s waiting, not sleeping – how I became a Mac user

I never was a fan of Apple products. Sure, they looked slick, but in my opinion, they were toys, for designers, not for hackers. And they were expensive. A good friend of mine had bought a MacBook Pro and after the initial excitement faded, he became more and more disappointed until he finally switched back to his Linux desktop and sold his Mac with a big loss. My prejudice against Macs seemed to be confirmed. Little did I know that I would join the cult of the Mac soon. Continue reading