vhost 怎么配置才能让多个项目都能访问。现在localhost绑定了一个项目,那么其他的该怎么配置才可以访问?

1 manhere Oct 25, 2013 127.0.0.1 127.0.0.2 127.0.0.3 |
3 tinypig Oct 25, 2013 |
4 cooper Oct 25, 2013 我的博客,希望帮到你。http://www.lapland.name/post/60755589823 |
5 young Oct 25, 2013 我是将每个项目都放localhost下, 再针对每个项目搞个location |
6 duhastmich Oct 25, 2013 本地就别用nginx了,一般都自带服务器的 |
7 msg7086 Oct 25, 2013 如果在虚拟机上跑的话可以在网卡上绑多个ip。如果单机的话还是考虑配多端口吧。 |
8 brikhoff OP @duhastmich 主要是想和生产环境一样 |
9 ipconfiger Oct 25, 2013 vhost用域名不用IP,然后在/etc/hosts添加本地映射 windows下在system32/drivers/etc/hosts |