I'm developing locally using wamp and i've configured the enviroment to handle more than one site, but i want to access a specific site using an ip address, i don't know if i have to add a port after the 127.0.0.1.
The following are my host settings.
127.0.0.1 localhost
127.0.0.1 www.site1.net
127.0.0.1 www.site3.com
and on vhosts.
<VirtualHost *:80>
ServerAdmin www.site1.net
DocumentRoot "c:/wamp/site1/"
ServerName www.site1.net
ServerAlias www.site1.net
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin www.site2.com
DocumentRoot "c:/wamp/site2/"
ServerName www.site2.com
ServerAlias www.site2.com
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>
Problem
When i put 127.0.0.1 in my address bar it goes to site1, and i don't know how to access site2 using ip.
Why i want this. Because when i try to access this sites from another device on the same network they don't work unless i use this ip: 172.20.10.4, this on the iphone, and this ip goes to localhost which is site1 and then i can't access site2.
But just www.site.net or www.site2.com works on the machine running wamp.
Edit. This is what is tried.
I put some ports on the 'listen' part of the httpd.confi;
Listen *:80
Listen *:8182
Listen *:8383
And changed htttpd-vhosts;
<VirtualHost *:80>
ServerAdmin localhost
DocumentRoot "c:/wamp/"
ServerName localhost
ServerAlias localhost
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>
<VirtualHost *:8181>
ServerAdmin www.site1.net
DocumentRoot "c:/wamp/site1/"
ServerName www.site1.net
ServerAlias www.site1.net
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>
<VirtualHost *:8182>
ServerAdmin www.site2.com
DocumentRoot "c:/wamp/site2/"
ServerName www.site2.com
ServerAlias www.site2.com
ErrorLog "logs/dummy-host.example.com-error.log"
CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>
This works on the devices, like on the iphone i can dial 172.20.10.4:8181 and it goes to site1 and 8182 goes to site two.
NEW PROBLEM
The url of the sites are now messed up, i can only access this sites by their ip with ports but not their domain names, so on the local machine 127.0.0.1:8181 goes to site 1 but www.site1.net doesn't find the server directory where this site is located.