Nginx-0.8.11

$host is the same as $http_host?

fastcgi_param SERVER_NAME $http_host;

i’ve had that in there forever.

just like $uri is short for $request_uri right?

this should be documented better somewhere

2009/8/31 Igor S. [email protected]:

I’m trying to list a bunch of domains under server_name. I’m doing this
because these domains generate dynamic content based on their name. it
seems to work fine except for one thing… $_SERVER[‘SERVER_NAME’] just
displays the first server_name entry.

So say we have the following:

server_name *.example1.com *.example2.com *.example3.com;

echo $_SERVER[‘SERVER_NAME’]; displays *.example1.com regardless which
domain was entered into the browser.

Regards,

-Team AMP
http://www.ampprod.com

On Mon, Aug 31, 2009 at 02:21:04PM -0700, Cliff W. wrote:

On Mon, 2009-08-31 at 14:07 -0700, Michael S. wrote:

$host is the same as $http_host?

Yes, because $http_HEADER is available for all headers, so even though
there’s already a $host variable, it’s also available via the
generalized $http_host variable:

Module ngx_http_core_module
Module ngx_http_core_module

No, $host gets its value from

  1. request line - http://HOST/…,
  2. $http_host,
  3. $server_name if reques has no “Host” header line.

In short, $uri is the current URI (after rewrites, redirects, etc),
$request_uri is the original requested URI.

Yes.

Shoot! I sent that a second too soon. Found the following and it
worked…

fastcgi_param SERVER_NAME $host;

Regards,

-Team AMP
http://www.ampprod.com

On Mon, 2009-08-31 at 14:07 -0700, Michael S. wrote:

$host is the same as $http_host?

Yes, because $http_HEADER is available for all headers, so even though
there’s already a $host variable, it’s also available via the
generalized $http_host variable:

http://wiki.nginx.org/NginxHttpCoreModule#.24host
http://wiki.nginx.org/NginxHttpCoreModule#.24http_HEADER

fastcgi_param SERVER_NAME $http_host;

i’ve had that in there forever.

just like $uri is short for $request_uri right?

No, $uri and $request_uri are not always equal:

http://wiki.nginx.org/NginxHttpCoreModule#.24request_uri
http://wiki.nginx.org/NginxHttpCoreModule#.24uri

In short, $uri is the current URI (after rewrites, redirects, etc),
$request_uri is the original requested URI.

Regards,
Cliff

On Tue, 2009-09-01 at 08:40 +0400, Igor S. wrote:

Module ngx_http_core_module

No, $host gets its value from

  1. request line - http://HOST/…,
  2. $http_host,
  3. $server_name if reques has no “Host” header line.

Ah, so $http_host could conceivably be different from $host as well.

Thanks.

Cliff

I looked at the forum and it seems that the Announcements Forum isn’t
updated at all. I really want to unsubscribe from this list but I would
like to find feeds on major stable releases and any security news. Is
there
an rss feed or list just for those two subjects?

If not that’s a pretty major deal that needs to be addressed. :slight_smile:

-Team AMP

On Thu, Sep 03, 2009 at 08:28:09AM -0500, AMP Admin wrote:

I looked at the forum and it seems that the Announcements Forum isn’t
updated at all. I really want to unsubscribe from this list but I would
like to find feeds on major stable releases and any security news. Is there
an rss feed or list just for those two subjects?

If not that’s a pretty major deal that needs to be addressed. :slight_smile:

There is RSS in Russian:
http://sysoev.ru/index.rss

I plan to create announcements list while migrating from one host to
another.

Haha I don’t know Russian. I know you work hard so I’m not complaining.

I do think that since nginx is growing so fast this is something that’ll
need to be addressed soon.

Also, if the Announcements forum was used we would be able to just
subscribe
to that rss… Nginx Forum - Announcements

Regards,

-Team AMP
http://www.ampprod.com

On Thu, Sep 03, 2009 at 09:06:26AM -0500, AMP Admin wrote:

Haha I don’t know Russian. I know you work hard so I’m not complaining.

In RSS you may see English word “nginx” and Arabic digits :slight_smile: