您的位置:首页 > 运维架构 > Nginx

用include指令实现nginx多虚拟主机配置

2015-03-30 13:33 381 查看

设定虚拟主机

include /host/nginx/conf/vhost/www_test_com.conf;

include /host/nginx/conf/vhost/www_test1_com.conf;

include /host/nginx/conf/vhost/www_test2_com.conf;

也可以使用 include /host/nginx/conf/vhost/*.conf 来代替的,这里支持通配符.

}

include在http字段下,server字段外,注意后面加上分号,修改好以后测试配置文件.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: