How to configure sub domains for Mamp localhost

hockmasm
14 years, 2 months ago
i have Mamp installed. working locally.

how do i get this to work wit the sub domains? i go to them and the page is not found.
bazza14
14 years, 2 months ago
Do you actually have any sub domains?
hockmasm
14 years, 2 months ago
under settings the mobile joomla has a iphone.licalhost, pda.localhost etc.

i go to those on my computer, iphone.localhost and the page is not found
bazza14
14 years, 2 months ago
I suspect that they are not found because there is no sub-domain called iphone or pda or what ever on your server. If you do not understand what a sub domain is don't worry you don't (for the moment) need one.
hockmasm
14 years, 2 months ago
i want to see my templates on my local machine.

if i type in iphone.localhost/joomla_1/

it forwards me to www.iphone.localhost/joomla_1/ and says server not found.
bazza14
14 years, 2 months ago
Then you will need a mobile phone emulator or the Firefox user agent plugin (if you use Firefox)
You will find info on the former in the Docs and on the latter in this forum.
miohtama
14 years, 2 months ago
You can configure iphone.localhost on OSX, Linux and Windows.
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)
hockmasm
14 years, 2 months ago
i have OSX using Mamp. what are the steps for that?

also if i have firefox uaswitcher installed, what do i do? just change it to iphone and it will show the iphone version?
bazza14
14 years, 2 months ago
Don't use a Mac myself so can't help with that but you could search for a system file called hosts.

Yes

The user agent in the http request will be read by JM and it will serve the web content in the Iphone template. You can google for other phones user agents and add them.

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.