Make Mac a personal Wi-Fi hotspot for a local MAMP server?

I usually do development / testing on my local Mac / MAMP installation and then access it from my smartphone / tablet by simply entering the correct IP address when the devices are on the same network.

However, I am also often in situations where I need to demonstrate or test my web applications in places where there is no Internet and my devices are not on the same network. What could I do then?

So, I would like to do the following:

  • My Mac works as a local server (MAMP)
  • My Mac (apparently) acts as a hotspot transmitting a network via Wi-Fi.
  • The ability to connect to this network (via WiFi) from my iPhone / iPad
  • Access local Mac MAMP sites through a browser from my iPhone / iPad (without "Internet")

Again, there is no "real" Internet or other AP. It would be ideal if my Mac could also act as a DHCP server (therefore, automatically assign IP addresses to devices connected via WiFi), but if it is too complicated, I will just enter the static IP addresses manually. BTW I don't need any fancy stuff like local domain names - only the IP addresses are ok :)

Any ideas on how you can accomplish something like this? If it is necessary or it simplifies or speeds up this workflow, I also do not go beyond other software to do this.

By the way, I had high hopes for this solution , but it seems incomplete, since my devices still report that there is no Internet on the network and they refuse to connect. The built-in Mac connection sharing can also help in some way (not sure yet?), But what kind of connection can be shared if they are all offline?

+6
source share
3 answers

I will post my partial answer here - it will hopefully benefit someone in the future.

In the end, it was pretty easy:

  • go to the "Sharing" panel in "System Preferences", click the "Edit" button in the "First Computer Name" window, and then change the local host name to something short, beautiful and readable (for example, web.local).
  • click the Wi-Fi icon on the Mac status menu bar and select "Create Network ..." at the bottom of the menu, give the new Wi-Fi network a name (+ another option if you want) and click "Create"
  • don't forget to start MAMP (or any other server you can use)
  • and voila - now you can see the new WiFi network from your iOS / Mac devices, connect to it and use the previously created address (i.e. http: //web.local ) to access your MAMP server (previously my mistake was that I wanted to take a more rigid / universal way with local DHCP / DNS servers and IP addresses, but this is much simpler, and OSX does everything for you)

It’s, unfortunately, partly because it only works with Apple Mac / iOS devices - other devices (tried it with Android) just didn’t see your personal network that you created (I believe that the details are transmitted via Apple Bonjour anyway so why). But something is better than nothing.

But its still pretty cool - now I can connect my iPhone and iPad to MAMP running on my Mac, even without an Internet connection or with an AP with DHCP support, taking care of the network details.

+6
source

Just tried this to access my Glassfish server via WiFi in the classroom, and I find that the network I created actually appears on Mac and Windows computers, however on a Mac you can access a machine serving Wi-Fi via my_machine_name. local Windows machines can only see the machine by specifying IP. However, it is interesting to note that once you use the machine as a WiFi point, it apparently is no longer assigned an IP (use ifconfig in the terminal to check this). However, if you ping your own machine, that is, ping my_machine_name.local, then it will be displayed in the IP address that can be used by machines connecting to the WiFi machine.

0
source

Go into the network utility and find your ip address, this will change your connection, for example, if you connect the Internet through a network cable that it will show in Ethernet (en0) or Wi-Fi, it will be in wifi (en1). This is your local IP address that you can access from your phone or genymotion

have a nice day

0
source

All Articles