php, $_SERVER & server_name
AMP Admin
admin at ampprod.com
Tue Sep 1 01:02:37 MSD 2009
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
-----Original Message-----
From: AMP Admin [mailto:admin at ampprod.com]
Sent: Monday, August 31, 2009 3:58 PM
To: 'nginx at sysoev.ru'
Subject: php, $_SERVER & server_name
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
More information about the nginx
mailing list