开发者

MAMP multiple VirtualHost

I'm trying to add a VirtualHost to my MAMP.

So here are the steps that I did.

  1. in /etc/hosts I add the following

    127.0.0.1 dev1.loc

    127.0.0.1 dev2.loc

  2. in httpd.conf I added

    < VirtualHost *:80 >

    DocumentRoot "path"

    ServerName dev1.loc

    < /VirtualHost >

    < VirtualHost *:80 >

    DocumentRoot "path"

    ServerName dev2.loc

    < /VirtualHost >

So that almost work but not all the way.

Meaning, dev1.loc does wo开发者_如何学编程rk, but dev2.loc is pointing me to dev1.loc.

Do I need to do something special?

Thanks,

Tee


Ah got it resolved.
I also need to uncomment this line in httpd.conf

NameVirtualHost *

Thanks,
Tee

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜