Welcome! Log In Create A New Profile

Advanced

Subdomain name in server_name

Posted by vidak 
Subdomain name in server_name
November 21, 2012 07:37PM
Hi,

I read lot of tutorials but couldn't find how to solve this problem.

As I can see nginx server_name is $_SERVER['SERVER_NAME'] in PHP

I tried server_name *.example.com .example.com; ... _; ... ""; some regex; but couldn't catch in PHP $_SERVER['SERVER_NAME'] with subdomain in inself.

I have about 270.000 subdomains and this is realy important to me.

Thanks in advance.

Vidak
Re: Subdomain name in server_name
November 21, 2012 07:45PM
I found solution

in PHP I wrote $_SERVER['SERVER_NAME'] = $_SERVER['HTTP_HOST'];

and in server_name I have subdomain and domain

Thanks.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 205
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready