use perl or shell scripts for configuration?

Frank Louwers frank at
Tue Mar 25 22:05:16 MSK 2008

Hi All,

I am wondering if there is a way for nginx to use some kind of  
external variables or to include a perl/shell script to use it's  
configuration? Let me show you what I mean with an example:

We are providing rails hosting services, and currently use lighty as  
default httpd, with 2 fastcgi ruby processes behind it. We've tuned  
the lighttpd scripts so that a user only needs a config file like this:

### Rails Application Configuration File

$HTTP["host"] =~ "^(dev\.)?rubyist\.be" { = "www"

   accesslog.filename          = base + "/logs/" + app + ".access.log"
   server.errorlog             = base + "/logs/" + app + ".error.log"

   load Rails with capistrano app

The lighty script then launches the lighttpd server as that user, with  
a port based on his uid, and does the dispatching-to-rails-fcgi magic.

I want to change to lighty, but need to have something similar, that  
does all the magic for the user, without the need to write their own  
config files.

Is there such a way in nginx?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list