Running Nginx with Concrete5

I’ve been sitting here all day bashing my head against one simple problem – getting Concrete5 working behind Nginx.

Concrete5 is a beautiful, simple php-based CMS – a loud answer to the complexity of Joomla and Drupal, but of course missing some of the power too. It’s perfect for web sites that aren’t managed by total geeks.

Nginx is the world’s fastest and most efficient web server. Hands down, no competition, no argument.

The problem I had integrating the two stems from nginx+php-fastcgi not correctly passing through the PATH_INFO variable so you can have URLs like “http://example.com/index.php/path/to/file”.

The solution was to slightly alter the usual php-fastcgi parameter processing. Below is my complete config for my concrete5 site. This worked on Debian Lenny with nginx 0.7.59.

 


server {
        listen          80;
        server_name     www.example.com;
        autoindex on;

    location / {
           root /var/www/example.com/concrete5/;
                index index.php;

        if (!-f $request_filename){
                   set $rule_0 1$rule_0;
               }
               if (!-d $request_filename){
                    set $rule_0 2$rule_0;
               }
               if ($rule_0 = "21"){
                    rewrite ^/(.*)$ /index.php/$1 last;
               }
    }

        location ~ .php($|/) {
           set  $script     $uri;
            set  $path_info  "";

            if ($uri ~ "^(.+.php)(/.+)") {
              set  $script     $1;
              set  $path_info  $2;
            }
          fastcgi_pass   127.0.0.1:9000;
          fastcgi_index  index.php;
          fastcgi_param  SCRIPT_FILENAME  /var/www/example.com/concrete5$fastcgi_script_name;
      fastcgi_param URI $uri; 
      fastcgi_param PATH_INFO $path_info;
          include        /etc/nginx/fastcgi.conf;
        }
}

Dick Cheney playing noose-dodger

Dick Cheney is hard to avoid in the US media right now. His public reasoning is that he wishes to defend the Bush record and speak out against Obama’s policies, which are “making the country less safe”.

I have my own theory (of course). Dick Cheney wishes to galvanise public opinion and pull just enough people onto his side that any war crimes prosecution of the Bush government will be politically unpopular.

He is attempting to turn what is an absolute, indisputable legal case (that the Bush government broke US and international laws) into a matter of debate.

What’s more, as long as Cheney is debating these points in the media, any action by Obama against him will look like Obama is trying to shut him up.

What I’m wondering is: why aren’t the media calling him out on this? And I don’t mean calling him out in the sense of “Let’s ask Dick Cheney on camera and let him deny it”. I mean actually stating an opinion and not letting him get away with saying no.

He’s slippery, to be sure. But let’s call a spade a spade. Dick Cheney is a political operator who flagrantly broke both the spirit and the letter of the law quite a few times while holding high office, and he should be prosecuted. This is not a partisan issue (though naturally it has become one). This is a legal issue. The media should not make themselves complicit in a process that will result in justice not being carried out.

Cheney is entitled to his opinion. It’s time for those in the media to have one too.

If we don’t, we will embolden all the Dick Cheneys yet to come. They will think “If I can just rise to a high enough office, I can get away with anything”.

Imagine the shift in international opinion about the USA should those people be put on trial. Do it carefully, do it quickly, do it properly. Just do it.

The morality of flying

Caveat: We’re one bottle of wine into a two-bottle evening.

I was chatting to a really wonderful friend-of-a-friend tonight. She runs a really cool-sounding consultancy that does corporate psychology mixed with reducing a company’s environmental footprint. Searching for the ultimate win-win of happy people, happy planet I guess.

I mentioned my upcoming trip to the US, and subsequent trip to the UK. Some of what I’m doing is talking about uses of technology to advance environmental and social causes, particularly carbon neutrality (or my preferred initiative, carbon/consumption benefit). And she immediately shot back with: “I take it you’re flying there? Why not do it remotely via the Internet?”.

I have no reasonable response to that. To be honest, I like travelling. I really, really do. Immersion in another culture, meeting new people, creating new opportunities and generally just breaking the old routine. It’s fun, it’s cool, I like it.

This whole conversation made me feel like a complete self-indulgent asshole. Which I admit, to a degree, I am. So what to do? How does Al Gore justify flying (if, indeed, he doesn’t come by boat or just teleport using the US’s poorly-hidden inventory of clearly alien technology).

To be frank: How does one reconcile taking a plane flight to educate people about reducing pollution, when flying is one inefficient-ass way of moving about?

Is it morally equivalent to shooting one innocent person in the head on the way to a conference on the reduction of gun violence? Hey, they were in the way! I needed to get to the conference!

Mood: ashamed

(with apologies to Livejournal)

Why Banks Suck

This morning around 10am I received a call from a really nice-sounding guy at the Commonwealth Bank, politely requesting that I transfer some money onto my credit card because I missed my monthly payment. It’s ok – I have the money and will transfer it shortly. But as I was sitting on the train later, I realised that something about the whole transaction made me uncomfortable.

I’ve had an account with this particular bank for about 20 years. I’ve had a credit card with them for at least 10 years. That credit card has been overdrawn once or twice, but in general I’d say that I’m a trustworthy customer.

Switching tracks for a moment, there’s been a big push in bank advertising over the last few years to make them seem more humane, more caring, like a partner in your life who looks after you when times are bad. They donate to bushfire appeals. They engage in a (proportionately tiny) degree of community work. The message is: we should trust them. With our money, with our lives.

Switching tracks again, the Global Financial Crisis has seen banks all over the world imploding due to bad asset risk management. In the quest to maximise profits, they took shortcuts and now governments (so by extension you and I) are bailing them out.

If I went to the bank today and asked for a bailout, I’d be given the polite, customer-service-oriented equivalent of “fuck off”. If I asked the debt collector on the phone to let this month’s minimum payment slide, I’d be told that’s not an option and my personal credit rating would go down.

I’m being asked to trust the bank, and the bank is systematically incapable of trusting me, because despite their fuzzy advertising, the bank is incapable of having a relationship with me. Yes, there is a little leeway for certain people in the bank to look at your history and tweak things, but fundamentally there is no facility for the bank to have an actual relationship with you.

It wasn’t always this way.

There was a time when we had local banks. Then the customers’ demands for convenience and the banks’ demands for efficiency drove rampant centralisation and computerisation. I haven’t spoken to the same teller more than once in about a decade. This is a serious problem.

There is a steep and growing differential of trust between banks and consumers, and what we’re beginning to see now is a correction. However, it’s a correction with no teeth because ultimately we have few alternatives (in Australia) when it comes to banks.

I get the feeling this is about to change.