10 Nov 2005
9351
hits

It grants you three wishes

We have released Cherokee "It grants you three wishes" 0.4.29. It includes some really interesting changes over the previous versions. These are the most important:
  • It adds a new configuration entry called "Request". The purpose of this entry is to allow you to define resource properties using regular expressions that are matched on the request (including pathinfo and query string).

    For example, let's imagine we have some stuff on the /download web directory (which is mapped on /var/www/download). Let's also suppose we have bunch of ISO images stored on /mnt/bigdisk/isos and we want to export it in /download as well:<

    Directory /download {
      Handler file
    }
    
    Request "^\/download/.*\.iso$" {
      DocumentRoot /mnt/bigdisk/isos
    }

    Isn't it handy? :-)

  • Another new feature is the support of priorities in the configuration file. Let's imagine this:
    Directory /dir1 {
       Handler dirlist
    }
    
    Extension bla {
       Handler cgi
    }

    What might happen if the server receives the request of http://www.example.com/dir1/thing.bla. Should it use the handler cgi or the dirlist?

    To solve these type of problems in this version, Cherokee supports priority management. The last definitions are stronger than the firsts ones and will overwrite the values.

    It is a cool feature used together with the Directory inherit mechanism. For example:

    Directory /cgi-bin {
       Handler cgi
    }
    
    Directory /cgi-bin/whatever {
        Auth Basic, Digest {
             Name "Confidential"
             Method htdigest {
                PasswdFile /var/www_htdigest
             }
        }
    }
    
    Request "^/cgi-bin/whatever/file\.cgi.*op\=commit.*" {
        Allow from 127.0.0.1
    }

    The request http://www.example.com/cgi-bin/whatever/file.cgi?op=commit will be allowed only from localhost, it will also request for authentication (it inherits the property from its parent directory) and will be managed with the handler CGI.

  • The last feature we have added on this release is the ability to include configuration files wherever you want to.

    For example, if you have a file called /etc/cherokee/cherokee.common, with the common configuration, and you want to add it to all your virtual host configurations, it is really easy to do:

    Server alobbs.com, www.alobbs.com {
         Include /etc/cherokee/cherokee.common
    
         #
         # Add here the specific configuration 
         # for this local host.
         #
    }
Enjoy Cherokee!!

Comments

Loradae on Tue Nov 29 03:40:09 2011
1830


That's way more clever than I was expecntig. Thanks!

Leave a comment

Name:

Comment:


Loading PhotoLog..


Search

 

Twitter


Facebook

Alvaro Lopez Ortega's Profile
Alvaro Lopez Ortega's Facebook Profile