![]() I think the added benefit of sharing your virtual hosts is well worth it. Clearly I'm biased, but as I've been advocating for years now, skip MAMP Pro and just go with regular MAMP + VirtualHostX. But, if you're developing more than one web site at a time (who isn't?), I think VirtualHostX is the way to go. Like I said above, Noah's method works great if you only have one website to test. Now there's no need to remember your site's local domain name or even a reason to type it in. Open the app, and, as long as you're on the same local wifi network, the app will automatically discover your shared virtual hosts and give you a one-tap way to view them in Mobile Safari. ![]() Open up the App Store on your iDevice and download the new VirtualHostX companion app. That local domain name you just typed into Mobile Safari? It's kind of long and ugly, isn't it? We can do better. One of my main goals with the latest version of VirtualHostX was to make sharing your web sites as drop-dead easy as possible. It really is magical the first time you see it work.īut, we're not done yet. Next to that magic checkbox, VirtualHostX gives you a Local Domain Name you can type into Mobile Safari on your iPhone or iPad to view your site. Next I made sure the PHP is running in FPM mode and added the following in. The site is using SSL certificate acquired from Letsencrypt. Also switched from mpmprefork to mpmevent. To that end, I enabled http2 module from Webmin > Servers > Apache Servers > Global Configuration > Configure Apache Modules. (Technically speaking, this will create a wildcard ServerAlias for your virtual host that you can use to access it from other machines on your local network.) But, the technical details don't really matter. Operating system: Ubuntu OS version: 18.04 I want to run my site over HTTP2 protocols. ![]() Just tick the "Local Domain Name" checkbox and click "Apply Changes" one more time. Once you've got your virtual hosts working, sharing them to your iDevice is super simple. Like Shawn says, "as any professional Web developer knows, doing your development locally is simply how it’s done." Once done, this will let you preview your sites locally using a custom domain name such as. Here's how.įirst, fire up your copy of VirtualHostX and create a new virtual host for each of your local web sites. ![]() And, as an added bonus, anyone on your local network (coworkers perhaps?) can access your development sites, too. With it, you can test an unlimited number of web sites at the same time from your iOS devices. I'd like to show you a more robust solution that uses a new feature in VirtualHostX 4.0. You have to go into MAMP and change your document root to a new directory any time you want to test a different site. That's a fine solution, but because you're accessing your web site via your Mac's IP address, you're limited to testing one web site at a time. Then, just browse to your Mac's IP address in Mobile Safari and voilà. His solution was to set MAMP's localhost directory to point to the web site folder you want to view on your iOS device. Today, Shawn Blanc linked to a post by Noah Stokes that explained how to test a locally hosted web site on your iOS device using MAMP Pro. ![]()
0 Comments
Leave a Reply. |