Skip to content

2006

mod_proxy_core commited to svn

mod_proxy_core just got commited to SVN and is now available to testers.

server.modules = ( ..., "mod_proxy_core", .. )

## works
$HTTP["url"] =~ "^/proxyme/" {
  proxy-core.balancer = "round-robin"
  proxy-core.protocol = "http"
  proxy-core.backends = ( "wikipedia.org" )

  ## to be done
  proxy-core.rewrite-response = (
    "Location" => ( 
      "^http://en.wikipedia.org/(.*)" => "http://127.0.0.1:1025/$1" ) )
  proxy-core.rewrite-request = (
    "URI" => (
      "^/proxyme(/.*)" => "$1" ) )
}

Reverse-Proxying mod_proxy_core

I just added and commited the header rewriting support for mod_proxy_core.

$HTTP["url"] =~ "^/proxyme(/|$)" {
  proxy-core.balancer = "round-robin"
  proxy-core.protocol = "http"
  proxy-core.backends = ( "en.wikipedia.org" )
  proxy-core.rewrite-response = (
    "Location" => ( "^http://en.wikipedia.org/(.*)" => "http://127.0.0.1:1025/proxyme/$1" ),
  )
  proxy-core.rewrite-request = (
    "_uri" => ( "^/proxyme/?(.*)" => "/$1" ),
    "Host" => ( ".*" => "en.wikipedia.org" ),
 )
}

The New mod_proxy_core

One thing I heard from everyone at the railsconf was: Please fix mod_proxy. In my talk I presented a look into the future and how mod_proxy will evolve in lighty 1.5.x, unification of the backend-plugin, .,.

Well, perhaps it will be a bit earlier than 1.5.0

X-Sendfile

… or the hidden secrets of lighty.

X-Sendfile is one of the important, but mostly unknown features. Time to put the spot-light on it and see why you want to use it.

lighty on win32

At the railsconf I spent some time to work on the native win32 port of lighty. Thanks to scons we already had a working build system on Windows, it only needed some #ifdef’s to get the beast compiling.

What I learned at the railsconf

The railsconf 2006 is over and it was a amazing week here in Chicago. Around 500 attendees made the conference a huge success. Inspiraring Keynotes, interesting lightning talks and a amazing show by ‘Why the Lucky Stiff and the Thirsty Cups’.

A interactive PHP-Shell

I was always jealous of iruby and ipython, the interactive shells for Ruby and Python. Instead of writing a script and running it through the interpreters you just execute the script line-by-line while you write it.

For debugging this is great. Compare a shell-script against the normal shell usage. It is more a ‘What if I …’ pattern instead of ‘I can write 100 lines of code without testing it’.

PHP was missing a powerful shell for a long time now. I needed one for my team at work and ‘php -a’, the interactive shell of PHP 5.0.x, is still not able to handle basic FATAL errors like ‘Function foo() not found’. So I wrote a php based interactive php-shell