nginx 二级域名配置

第一步:

在域名解析中分别解析A,B,C三个二级域名

第二步:

    server {
        listen       80;
        server_name  a.abc.cn;

        location / {
            root   html/aaa;
            index  index.html index.htm;
        }
    }
    server {
        listen       80;
        server_name  b.abc.cn;

        location / {
            root   html/bbb;
            index  index.html index.htm;
        }
    }

  然后在根目录下创建3个文件夹,分别对应3个网站

 

posted @ 2025-04-24 15:43  石曼迪  Views(17)  Comments(0)    收藏  举报
瓴域建设-环保事业中心