Reputation: 28892
I'm trying to add a VirtualHost to my MAMP.
So here are the steps that I did.
in /etc/hosts I add the following
127.0.0.1 dev1.loc
127.0.0.1 dev2.loc
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 work, but dev2.loc is pointing me to dev1.loc.
Do I need to do something special?
Thanks,
Tee
Upvotes: 0
Views: 568
Reputation: 28892
Ah got it resolved.
I also need to uncomment this line in httpd.conf
NameVirtualHost *
Thanks,
Tee
Upvotes: 1