0

I want to view my website on my iPad and iPhone to take a look how my responsive design looks like. I'm running on a macbook air and I was wondering if there is any type of way to run my local drupal site on the ipad or iphone. I heard you could connect through the ip or somehow. Any ideas?

Anyone done this before?

5
  • if your iphone / ipad are on your local network as your website is; then sure use the IP address. you cant edit the Hosts file on the iPhone i believe.
    – tenken
    Nov 27 '13 at 17:59
  • Can you walk me through? Never done this and I barely know how to check my own IP. Like don't you need to specify folder to the url? Nov 27 '13 at 18:01
  • 1
    @user2545642 You need to make sure port 80 (or whatever port your web server is listening on) is open on your local machine. Chances are it's already open. For *nix, use ifconfig in terminal to get your local IP, for Windows use ipconfig. Then browse to that IP on your iPhone
    – Clive
    Nov 27 '13 at 18:06
  • Apache is on port 80 and I typed in my IP Adress. I got page not found tho Nov 27 '13 at 18:16
  • It says safari couldn't find the server on my ipad Nov 27 '13 at 18:26
4

Go to the terminal and type

ifconfig

Check for you IP address.

Suppose your drupal url is

www.localhost/drupal

then go to your iPad and iPhone browser and type

IP Address/drupal

Using this you could see your local drupal site on iPad and iPhone.

1
  • I never even considered it might be in a sub-folder, good shout!
    – Clive
    Nov 27 '13 at 19:11
1

There are some pretty significant details missing that makes answering this difficult.

If you have a web server running on your local computer and your iPad/iPhone is connected to the same local network, you can definitely view the website on those devices.

You'll need to determine the local IP address of your machine (usually starts with 192.168), and then try to visit that IP address in your mobile browser. How you do this varies greatly depending on your operating system.

See: http://www.bitwiseim.com/wiki/index.php?title=Determine_your_LAN_/Local/_Internal_IP_Address for common ways to find this.

There are so many other factors involved, though, that I don't know if an answer can be given that is useful without knowing more about your setup.

5
  • ok I went to my ip adress but it says Not found. Sorry if I didn't provied more information. Yes, my webserver is running on the same local network Nov 27 '13 at 18:12
  • 1
    What kind of web server and operating system do you have? What URL do you visit to see your website on your server? Also, is your mobile device on the network, too? if it's not on the local wifi it won't see it. Nov 27 '13 at 18:18
  • I made a custom one so when I visit it I just type "mywebsite.dev". I run on MAMP and i'm running on the Mac OS X. Check Clive answer. Didn't work tho Nov 27 '13 at 18:19
  • 2
    If you go to http://localhost/ in your dev machine do you see the same site that's at http://mywebsite.dev? If not, you either need to set up a default ('catch-all') vhost on MAMP, or add a DNS entry on your local network (probably on the router) to forward mywebsite.dev onto your dev machine's IP address. With the latter method you could then browse to mywebsite.dev with the ipad too. Neither are something we can really help with here I'm afraid, we're strictly Drupal-only and that's well into network/server admin territory
    – Clive
    Nov 27 '13 at 18:30
  • 2
    There's some very good advice here
    – Clive
    Nov 27 '13 at 18:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.