Welcome! Log In Create A New Profile

Advanced

Re: Variables in access_log

July 07, 2009 05:53AM
batrick Wrote:
-------------------------------------------------------
> I have run into a similar problem. I wanted to set
> up a number of virtual hosts that each share the
> same configuration except, of course, for the
> domain name and path. So my plan was to set some
> environment variables, and then include the
> template configuration file.

My particular set up is not for 'live' sites (in the typical manner), and I would support Merlin's suggestion to build config files for each one. I do infact do exactly that. A simple template with some variables replaced, and you are away. You never know when you need to add just that one custom setting for that client. For the dev sites, I would just build a completely new site if something specific was wanted, but to unravel a live site from such a fixed structure might be troublesome.

> Unfortunately, the plan faltered somewhat because
> error_log and server_name do not seem to support
> variables.
>
> Does anybody know of a documentation which
> directives support variables and which do not?

I'm guessing with the pace at which nginx is moving, that if you want such a list, you will have to head to the wiki and compile it yourself.

However, server_name does take wild cards, and you can do regular expression matching on $host. As I have done in my original post.
Subject Author Posted

Variables in access_log

miradev July 03, 2009 09:28AM

Re: Variables in access_log

Brent Bloxam July 03, 2009 10:43AM

Re: Variables in access_log

miradev July 07, 2009 05:44AM

Re: Variables in access_log

batrick July 05, 2009 05:40AM

Re: Variables in access_log

merlin corey July 06, 2009 08:41PM

Re: Variables in access_log

miradev July 07, 2009 05:53AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 217
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready