Use perl or shell scripts for configuration?

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” {
var.app = “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?

Regards,

Frank

On Tue, Mar 25, 2008 at 8:05 PM, Frank L. [email protected]
wrote:

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.

you could use script to generate the config file that is included from
‘main’ config file (or generate the ‘main’ config all together).

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs