Welcome! Log In Create A New Profile

Advanced

Re: Variables in access_log

merlin corey
July 06, 2009 08:41PM
I believe server_name now supports some variables but maybe this is
just in development branch. The official documentation is in Russian
and located at http://sysoev.ru/nginx/docs/ . There is also a wiki at
http://wiki.nginx.org with English and Chinese translations of some of
the documentation, but it is not always up to date or complete.
Google translate can do a readable job in many cases, and the
configuration language is always the same in any language, plus there
is the common language C that nginx is written in. These are the
sources you should look through.

Completely separately regarding configurations, I am under the
understanding that nginx performs better with fully specified server
names. It should be easy enough to put common configuration into
files which you include in each server { } block as necessary. This
can easily be generated by a script so you don't have to do it by hand
if you have a lot of domains. The benefits are you get the common
configuration, separate error logging, separate access logging, and
flexibility to make individual host changes while efficiently
selecting proper server blocks.

-- Merlin

On 7/5/09, batrick <nginx-forum@nginx.us> 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.
>
> 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?
>
> Kind regards,
>
> batrick
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,3722,3763#msg-3763
>
>
>
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: 321
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