I’m using Apache, PHP (MAMP) in OSX environment, and Symfony framework for develpment.
Symfony requires the use of Virtual Host for development locally, so I’ve added these lines on my /etc/apache2/hosts file:
127.0.0.1 frontenda.dev
127.0.0.1 frontendb.dev
Then at my /Applications/MAMP/conf/apache/extra/httpd.vhosts.conf, I’ve added these lines:
<VirtualHost *:80>
ServerName frontenda.dev
DocumentRoot /Users/geo/Sites/frontenda/www/
</VirtualHost>
<VirtualHost *:80>
ServerName frontendb.dev
DocumentRoot /Users/geo/Sites/frontendb/www/
</VirtualHost>
I can open those folders from my browser by these urls http://frontenda.dev or http://frontendb.dev. My question is what should I do (if this is even possible) to use IP address instead of frontenda.dev or frontendb.dev? What I mean with that is, let say my machine ip 192.168.1.144, can I do 192.168.1.144/frontenda or even assigning different port number for different folder?
I’ve had a better answer. I get it working using xip.io from 37signals http://xip.io/. You can do like this: