# vi /usr/local/nginx/conf/nginx.conf //增加
include vhost/*.conf;
# mkdir /usr/local/nginx/conf/vhost
# cd !$; vim default.conf //加入如下内容
server {
#有这个标记的就是默认虚拟主机
listen 80 default_server;
server_name aaa.com;
index index.html index.htm index.php;
root /data/wwwroot/default;
}新建默认站点目录
# mkdir -p /data/wwwroot/default/
# echo “This is a default site.”>/data/wwwroot/default/index.html //重定向输入内容
# /usr/local/nginx/sbin/nginx -t 验证是否正确
# /usr/local/nginx/sbin/nginx -s reload 从新加载
# curl localhost

# curl -x127.0.0.1:80 aaa.com


