Welcome! Log In Create A New Profile

Advanced

How to log virtual server name

Lucian D. Kafka
February 27, 2012 01:20AM
Hi All,

We have a virtual hosting setup where multiple domains are delegated to the same server IP address, and Nginx acts as a caching proxy server in front of the web server.

I am encountering 2 issues:

1. Cannot set more than 1 server name - Nginx is ignoring multiple server names defined on the same IP with a warning message

2. Cannot log the virtual server name (Apache %v equivalent) to the access_log. Any variable in the custom log format - ie. $server_name, $host, etc does not log the Host headers, but rather the server name string set with the server_name directive (if matched). This makes it impossible to have a combined log file for different sites set in a virtual hosting environment on the same IP address.

Any ideas how to get this working?

Thank you,

Luci



_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How to log virtual server name

Lucian D. Kafka February 27, 2012 01:20AM

Re: How to log virtual server name

Igor Sysoev February 27, 2012 01:24AM

RE: How to log virtual server name

Lucian D. Kafka February 27, 2012 05:50PM

Re: How to log virtual server name

Francis Daly February 27, 2012 06:38PM

RE: How to log virtual server name

Lucian D. Kafka February 27, 2012 09:30PM

Re: How to log virtual server name

Francis Daly February 28, 2012 01:54PM

Re: How to log virtual server name

Piotr Sikora February 27, 2012 01:28AM

Re: How to log virtual server name

Roger Pack August 07, 2013 03:10PM

Re: How to log virtual server name

B.R. August 07, 2013 03:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 270
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