Nginx configure multiple domain names

here is the configuration file on my computer nginx
parsing localhost to "D:/phpStudy/PHPTutorial/WWW" by default

I want to resolve several domain names, such as

 thinkphp.com      D:/phpStudy/PHPTutorial/WWW/thinkphp
 laravel.com       D:/phpStudy/PHPTutorial/WWW/laravel
 wordpress.com     D:/phpStudy/PHPTutorial/WWW/wordpress

how to change the configuration file, how to write it in the standard way, is the

commonly used in the server.
-sharp  power by www.php.cn
-sharpuser  nobody;
worker_processes  1;

-sharperror_log  logs/error.log;
-sharperror_log  logs/error.log  notice;
-sharperror_log  logs/error.log  info;

-sharppid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    -sharplog_format  main  "$remote_addr - $remote_user [$time_local] "$request" "
    -sharp                  "$status $body_bytes_sent "$http_referer" "
    -sharp                  ""$http_user_agent" "$http_x_forwarded_for"";

    -sharpaccess_log  logs/access.log  main;

    sendfile        on;
    -sharptcp_nopush     on;

    -sharpkeepalive_timeout  0;
    keepalive_timeout  65;
    -sharptcp_nodelay on;
  fastcgi_connect_timeout 300;
  fastcgi_send_timeout 300;
  fastcgi_read_timeout 300;
  fastcgi_buffer_size 128k;
  fastcgi_buffers 4 128k;
  fastcgi_busy_buffers_size 256k;
  fastcgi_temp_file_write_size 256k;

  -sharpgzip  on;
  gzip on;
  gzip_min_length  1k;
  gzip_buffers     4 32k;
  gzip_http_version 1.1;
  gzip_comp_level 2;
  gzip_types       text/plain application/x-javascript text/css application/xml;
  gzip_vary on;
  gzip_disable "MSIE [1-6].";

  server_names_hash_bucket_size 128;
  client_max_body_size     100m; 
  client_header_buffer_size 256k;
  large_client_header_buffers 4 256k;

    server {
        listen       80;
        server_name  localhost;

        -sharpcharset koi8-r;

        -sharpaccess_log  logs/host.access.log  main;
        root    "D:/phpStudy/PHPTutorial/WWW";
        location / {
            index  index.html index.htm index.php l.php;
           autoindex  off;
        }

        -sharperror_page  404              /404.html;

        -sharp redirect server error pages to the static page /50x.html
        -sharp
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }

        -sharp proxy the PHP scripts to Apache listening on 127.0.0.1:80
        -sharp
        -sharplocation ~ \.php$ {
        -sharp    proxy_pass   http://127.0.0.1;
        -sharp}

        -sharp pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        -sharp
        location ~ \.php(.*)$  {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_param  PATH_INFO  $fastcgi_path_info;
            fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
            include        fastcgi_params;
        }

        -sharp deny access to .htaccess files, if Apache"s document root
        -sharp concurs with nginx"s one
        -sharp
        -sharplocation ~ /\.ht {
        -sharp    deny  all;
        -sharp}
    }


    -sharp HTTPS server
    -sharp
    -sharpserver {
    -sharp    listen       443;
    -sharp    server_name  localhost;

    -sharp    ssl                  on;
    -sharp    ssl_certificate      cert.pem;
    -sharp    ssl_certificate_key  cert.key;

    -sharp    ssl_session_timeout  5m;

    -sharp    ssl_protocols  SSLv2 SSLv3 TLSv1;
    -sharp    ssl_ciphers  HIGH:!aNULL:!MD5;
    -sharp    ssl_prefer_server_ciphers   on;

    -sharp    location / {
    -sharp        root   html;
    -sharp        index  index.html index.htm;
    -sharp    }
    -sharp}

include vhosts.conf;
include first.com.conf;
}

Apr.19,2022

1. The configuration file needs to have multiple server , which is vhost of NGINX ,
2, server_name is the corresponding domain name
3, root is the root directory of the corresponding site, here is the root directory of the corresponding project

.
   server {
        listen       80;
        server_name  thinkphp.com;
        location / {
            root    "D:/phpStudy/PHPTutorial/WWW";
            index  index.html index.htm index.php l.php;
               autoindex  off;
        }
   }
    server {
        listen       80;
        server_name  laravel.com;
        location / {
            root    "D:/phpStudy/PHPTutorial/WWW";
            index  index.html index.htm index.php l.php;
            autoindex  off;
        }
   }
    server {
        listen       80;
        server_name  wordpress.com;
        location / {
            root    "D:/phpStudy/PHPTutorial/WWW";
            index  index.html index.htm index.php l.php;
            autoindex  off;
        }
   }
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1be870c-4693d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1be870c-4693d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?