#1创建vhosts目录 cd /etc/nginx mkdir vhosts #2编辑nginx配置文件 vim /etc/nginx/nginx.conf 在 http{ } 中 server { } 之前 加入 include /etc/nginx/vhosts/*.conf;