atom feed2 messages in ru.sysoev.nginxuse perl or shell scripts for configu...
FromSent OnAttachments
Frank LouwersMar 25, 2008 12:04 pm 
Almir KaricMar 25, 2008 12:26 pm 
Subject:use perl or shell scripts for configuration?
From:Frank Louwers (fran@public.gmane.org)
Date:Mar 25, 2008 12:04:53 pm
List:ru.sysoev.nginx

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