مال من server name نداره:

کد PHP:
server {
        
listen   127.0.0.1:80;

        
root home/localhost/public_html;
        
index index.php index.html;

        
log_not_found off;
        
charset utf-8;

        
access_log  logs/access.log  main;

        
location ~ /\. {deny all;}

        
location / {

            if (
$host ~ ^(www\.)?([a-z0-9\-\.]+)$){
                
root home/$2/public_html;
                
access_log  logs/$2-access.log  main;
            }

        }

        
location ~ \.php$ {

            if (
$host ~ ^(www\.)?([a-z0-9\-\.]+)$){
                
root home/$2/public_html;
                
access_log  logs/$2-access.log  main;
            }

            if (!-
e $document_root$document_uri){return 404;}
            
fastcgi_pass localhost:9000;
            
fastcgi_index index.php;
            
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

            include 
fastcgi_params;

        }
    }

    
server {
        
listen 127.0.0.1:443;
        include 
ssl.conf;

        
root home/localhost/public_html;
        
index index.php index.html;

        
log_not_found off;
        
charset utf-8;

        
access_log  logs/access.log  main;

        
location ~ /\. {deny all;}

        
location / {

            if (
$host ~ ^(www\.)?([a-z0-9\-\.]+)$){
                
root home/$2/public_html;
                
access_log  logs/$2-access.log  main;
            }

        }

        
location ~ \.php$ {

            if (
$host ~ ^(www\.)?([a-z0-9\-\.]+)$){
                
root home/$2/public_html;
                
access_log  logs/$2-access.log  main;
            }

            if (!-
e $document_root$document_uri){return 404;}
            
fastcgi_pass localhost:9000;
            
fastcgi_index index.php;
            
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

            include 
fastcgi_params;

        }
    }


    include 
tools-*.conf;

    include 
vhosts/*.conf;


حالم بد شد از بس با nginx ور رفتم