You can configure iphone.localhost on OSX, Linux and Windows like what Miohtama said.
http://www.mobilejoomla.com/forum/10-subdomains/3179-how-to-configure-sub-domains-for-mamp-localhost.html
Here is some info:
Modifying your local hosts fileHosts file is your operating system text file which allows you to manually add DNS names on different IP addresses. For testing and developing Mobile Joomla! you need to assign another name for your local computer, also known as localhost or by IP address 127.0.0.1.
After modifications, the following URL will render in web mode (like before modification)
localhost
..but the following will result to the mobile mode
iphone.localhost
On Windows: C:\\Windows\\SYSTEM32\\Drivers\\etc\\hosts
On UNIX: /etc/hosts
Adding required lines
Add the following line to hosts file (note that on UNIX you need to use sudo):
127.0.0.1 iphone.localhost mobile.localhost
I recommend using iPhone / Android simulator for testing and Firefox + UASwitcher add-on to development (no hosts needed).
For iPhone stimulator, please go to
iphonetester.com
If you are using Window Vista or 7, please note when you make the changes of hosts using notepad, you will need to run notepad as a administrator or otherwise, you will be denied access.
ClickStart ->All Programs -> Accessories. Right-clickNotepad, and then click Run as administrator. If you are prompted for an administrator password or for a confirmation, type the password, or clickAllow or Yes.
Open the Hosts file (from the notepad you just opened) , make your changes, and then click File ->Save