David Zikai

Three weeks ago today, on January the 9th, at 14:50 CET, our son David 子凯 was born. We are very happy to have him with us and wish him a happy and peaceful life.
Blogging has changed, now that he is here:
Apache, mod_proxy_ajp, Tomcat, SSLpache, mod_proxy_ajp, Tomcat, SSL
Just because I had to fight with it today and did not find the solution spelled out elsewhere (I found all parts, but not the definitive answer):
If you have an apache server that uses modproxyajp to proxy requests to tomcat and you want to use https as schema, even when you do redirects, you have to massage the ajp connector settings of tomcats server.xml.
Only when you add the following attributes to the connector, a redirect (for example a Spring RedirectView) will stay in https and not jump to http:
- scheme=”https”
- secure=”true”
- proxyPort=”443”
The scure attribute might not really be necessary, but it did no harm.
This is actually from Robin Johnson, but he did not mention the connector it has to be on.
If you think about it, it’s clear that it has to be the ajp connector, since apache is using that one to talk to tomcat.
Well, took me some nerves to get this into production today, so I thought I mention it, maybe it will help someone else. For me, I hope I won’t have to deal with tomact and jsp anymore…
Greener Hosting
Yesterday evening (GMT) it came to my mind that I don’t know about a dedicated “green” hosting provider. There are a lot of cheap hosting providers, but cheap often means that they use cheap energy to power their servers, and cheap energy currently translates to coal or nuclear power. Now after our last move to a new apartment two and a half years ago my wife and I decided to select the “regio”-energy program of our local energy service company. In this program we pay 1.8ct (Euro, approx. 2.7 ct US Dollar) more for each kWh, which is used to support the construction and operation of renewable energy sources.
I would pay more for my web hosting, if I knew that the increase price would mean less CO2 emissions. http://www.co2stats.com is making a case of purchasing carbon offsets for your website. It’s a good idea, but it would be even better if I knew that my site wasn’t producing any CO2 to start with. My thought yesterday evening was that there could be market for “green hosting”, and it either isn’t tapped yet, or I haven’t found the ISP’s who are committed to our environment.
And then, this morning I see Google’s announcement, which shows that I’m not the only one who is thinking about this.
The question is: Would you pay more for web hosting, if it would reduce the CO2 emissions produced by your web site?
