Welcome! Log In Create A New Profile

Advanced

Re: Where is third level of domain gone

June 17, 2009 06:10AM
On Wed, Jun 17, 2009 at 12:58:07PM +0400, Maxim Dounin wrote:

> Hello!
>
> On Wed, Jun 17, 2009 at 03:33:52PM +0800, fei dong wrote:
>
> > Hello,
> >
> > I am using Nginx 0.7.54 with php 5.2.8 as the web server. When I configure
> > the host name, like: *.music.goog.com, I find a very wield phenonmenon that
> > I can't get the third level of this domain.
> >
> > I print this variable in php:
> > $_SERVER['SERVER_NAME'] ; it says: music.goog.com
>
> SERVER_NAME is server's name, not Host header from client request.
> Use HTTP_HOST instead.

If he uses fastcgi, then he may use

- fastcgi_param SERVER_NAME $server_name;
+ fastcgi_param SERVER_NAME $host;


--
Igor Sysoev
http://sysoev.ru/en/
Subject Author Posted

Where is third level of domain gone

fei dong June 17, 2009 03:33AM

Re: Where is third level of domain gone

Maxim Dounin June 17, 2009 04:58AM

Re: Where is third level of domain gone

Igor Sysoev June 17, 2009 06:10AM

Re: Where is third level of domain gone

fei dong June 18, 2009 12:04AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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