VirtualHostX

Posted on  by 



On macOS, another solution is to use the tool virtualhostx to make a Virtual Host to point to your folder. For many hosting services (GoDaddy, 1and1), your web server is being served from a user directory that already uses modrewrite. VirtualHostX8.7.10TNT.zi p (22.04 MB) Choose free or premium download SLOW DOWNLOAD. FAST INSTANT DOWNLOAD. I am a newbie and I set up Mamp and virtualhostx on my IMAC and it works fine except when I restart the server in virtualhostx it tells me multiple servers are running and it could cause conflicts. My connection was interrupted when i was installing virtualhostx vm ( when virtualhostx was downloading ubuntu trusty image), but virtualhostx tell me that the vm was correctly installed, Virtual Machine - destroy won't work, i uninstalled virtualhostx using appcleaner and cleanmymac, and installed it again, nothing change, ater destroying the.

[Deprecated: for OSX 10.9 and up, please use rba.sh.]

VirtualHostX is the easiest way to host multiple websites on your Mac. It’s the perfect solution for web designers working on more than one project at a time. (Aren’t we all?) No more nesting folders and no more asking the programmer across the cubicle for help.

It has been a while since I posted my guides for setting up a local development environment and how to add SSL to this set-up. This setup, among other things, required the use of a hostname-to-ip-management type of software. My choice was VirtualHostX.

Recent events have brought a new temporary colleague to our workforce and he brought in some fresh blood – so to speak (post in Dutch).

Today I have successfully eliminated the need for VirtualHostX – at least, in my development environment.

Using only the sentiment, the essence as it were, of his post, I have revised my own setup by doing the following. You can safely follow these steps after having setup the environment as described in my posts here and here.

There is one known issue; the SSL certificate generated no longer matches the domain, but who cares, it works :) It’s not like we’re creating a real-world-publicly-reached environment, right?

Reminder; This post is the fourth post in a series to build the “ultimate” setup. See ‘The “Ultimate” Guide …’ for a complete list.

Configuring BIND

  1. Fire-up the terminal and switch to super-user mode.
  2. Then edit the /etc/named.conf file to add the local zone;
    Add to /etc/named.conf (download file)zone 'local' IN {
    type master;
    file 'local.zone';
    allow-update { none; };
    };
  3. And create the zone-file:
    File-content for /var/named/local.zone (download file)$TTL 86400
    $ORIGIN local.
    @ IN SOA localhost. user.domain.com. (
    42 ; serial
    3H ; refresh
    15M ; retry
    1W ; expiry
    1D ) ; minimum
    1D IN NS @
    1D IN A 127.0.0.1
    * IN A 127.0.0.1
  4. Now execute these commands;
    Shell-Scriptrndc-confgen -b 256 -p 54 > /etc/rndc.conf
    head -n5 /etc/rndc.conf | tail -n4 > /etc/rndc.key
  5. Finally, we need to configure named to start on boot and start it.
    Shell-Scriptlaunchctl load -w /System/Library/LaunchDaemons/org.isc.named.plist
    launchctl start org.isc.named
  6. Now we can test the name server should return
    Shell output# nslookup anything.local 127.0.0.1
    Server: 127.0.0.1
    Address: 127.0.0.1#53
    Name: anything.local
    Address: 127.0.0.1

If this works as planned, add 127.0.0.1 to your networks DNS tab.

Reconfiguring Apache for the use of Wildcard Virtual Hosts.

IMPORTANT NOTE;

I have discovered that using a virtual document root as described below will cause problems with redirects/rewrites using .htaccess rewrite rules other than the root of the website. See my post on how to overcome this by rebuilding the Apache2 VirtualHost Configuration automatically. If you still want to use a virtual document root, follow instructions that follow now, otherwise, skip the rest.

Edit the file /etc/apache2/extra/httpd-vhost.conf (still as SuperUser)

Drivers skydigital. Make it look like this; Calibre.

File-content for httpd-vhost.conf (download file)NameVirtualHost *:80
<VirtualHost *:80>
ServerAlias *.local
UseCanonicalName Off
VirtualDocumentRoot '/Development/%0.0/public_html'
php_admin_value auto_prepend_file /Development/auto_document_root.php
</VirtualHost>
NameVirtualHost *:443
<VirtualHost *:443>
ServerAlias *.local
UseCanonicalName Off
VirtualDocumentRoot '/Development/%0.0/public_html'
php_admin_value auto_prepend_file /Development/auto_document_root.php
SSLEngine On
SSLCertificateKeyFile /etc/apache2/ssl.key/server.key
SSLCertificateFile /etc/apache2/ssl.key/server.crt
</VirtualHost>
VirtualHostX

Please notice the reference to /Development/auto_document_root.php

create a file with this name and place this inside;

File-content for /Development/auto_document_root.php (download file)<?php
$_SERVER['DOCUMENT_ROOT'] = dirname(__FILE__) .'/{$_SERVER['HTTP_HOST']}/public_html';

This will make sure that the DOCUMENT_ROOT property of the environment is set correctly.

As per hint of Jorijn, check to make sure that the line

LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so
is not commented out in /etc/apache2/httpd.conf

Final notes

Note that the directory structure is now always: /Development/domain.local/public_html/(your website files here). Need 3 domain-names to the same web-space? use symbolic links!

And with that, I say, Happy coding, thank you Jorijn and as usual; comments, questions, remarks; PLEASE :)

@kamstewart I'm finding @VirtualHostX is by far the easiest/best way to manage virtual hosts on Mac. http://t.co/f91DTwvHlH

— kamstewart June 5, 2015

@eurafaelsilva I'm using @VirtualHostX to develop websites locally on my Mac.

— eurafaelsilva May 28, 2015

@igorlgentil FINALLY a host file manager for mac that WORKS!!!! https://t.co/t82xBdT5gE

— igorlgentil May 26, 2015

@johnetrent Need to create virtual hosts on your Mac? Give @VirtualHostX a try. http://t.co/l7Nm5xIUcr

— johnetrent May 14, 2015

@austinginder @leerdustin @justincarroll I use the built in apache with other goodies like @virtualhostx @phpmya @sequelpro and @gittower.

— austinginder March 6, 2015

@philwinkle I'm kind of loving @clickontyler Hobo. Making it kind of easy and pleasurable to work with Vagrant again.

— philwinkle January 31, 2015

@diek007 Tyler is making our lives easy once again.@HoboForMac makes setting up Vagrant dev envs easy. http://t.co/0wNjOJRRNo

— diek007 January 21, 2015

@jayfreestone Hobo looks like a really neat Vagrant GUI for OS X: http://t.co/YX3HwOPRpK

— jayfreestone January 20, 2015

@davzie Vagrant made super easy for your team? Shut up and take my money Tyler: http://t.co/gp6wiMbHxV

— davzie January 20, 2015

@randysteiger Happy customer of 5 years. Thanks to @clickontyler for the amazing product support. @virtualhostx

— randysteiger November 20, 2014

@godd4rd @Malarkey virtualhostX is the easiest way I've found to host multiple sites locally.

— godd4rd September 29, 2014

@iamchrisbennett @johnheimkes Started using VirtualHostX instead of MAMP. Very impressed. https://t.co/474Ham7Uqt

— iamchrisbennett September 18, 2014

@jb_ma Virtual HostX, une solution bien pratique pour gérer facilement ses vhosts sur mac http://t.co/sQHeH0PqVs

— jb_ma June 10, 2014

@MacMiniVault @zendogmedia - Server.app (Apple) - MAMP http://t.co/5KXyfKXiG7 - Home-brew http://t.co/Lh6ILWxylv - virtualhostx http://t.co/049CQUsv5w

— MacMiniVault May 1, 2014

@ABillionSuns Shout out to @clickontyler for excellent software support. Their tools for localhostin’ web designers are great.

— ABillionSuns April 30, 2014

@hotmeteor @virtualhostx Cool. Thanks for a great service and app. Been a long time user.

— hotmeteor April 30, 2014

@vexed Waiting on a render? Check out Minion by my friend @tylerhall, then hit the bar till you get a email! http://t.co/4G9wQDP6yH

— vexed April 28, 2014

@mrdennis Minion for Mac. 'It's like IFTTT for OS X.' Could come in handy! http://t.co/rfNykWN91y

— mrdennis April 28, 2014

@eviltester Check I have local access for tomorrow's http://t.co/3iGi7gVarQ tutorial web pages. Tick. @virtualhostx made that easy

— eviltester April 28, 2014

@App_Insight_ Installed MAMP & VirtualHostX, set up some dev sites - and they just work! + the mobile app is icing on cake - nice work @clickontyler

— App_Insight_ April 14, 2014

@brandonjcscott Been looking for something like @virtualhostx for ages, unsure how I missed it. Absolutely awesome app, and they knocked off 75% for me!

— brandonjcscott April 9, 2014

@PaulFWatts Export RapidWeaver Foundation project to disk, Setup in VirtualHostX and CodeKit. Workflow saving HOURS of hand coding @joeworkman

— PaulFWatts March 24, 2014

@CustomComputerT @philsturgeon @jeffrey_way You should try @VirtualHostX. It works with the native stack and MAMP, but gives functionality similar to POW.

— CustomComputerT March 6, 2014

@robertmiles3 Upgraded to v5 of @virtualhostx and love the new features. Great to support an indie dev like myself. @clickontyler

— robertmiles3 March 5, 2014

@brianlarson @virtualhostx Awesomely prompt help from @clickontyler yet again. :)

— brianlarson March 2, 2014

@underscorefunk New version of @virtualhostx is out. if you do web dev and don't have this… get it :D http://t.co/FNLfrE1o6c it's on sale too!

— underscorefunk February 25, 2014

@allrude happy with the new #VirtualhostX 5.0 read about it here http://t.co/ge21vnwp31

Virtualhostx Pro

— allrude February 25, 2014

@RavenJon ATTN Web #Designers & #Developers: New @virtualhostx Ver 5 is now available http://t.co/wSSKmFBYi5 by @clickontyler http://t.co/1tAroWNImF

— RavenJon February 25, 2014

@keithholjencin Happy to be giving @clickontyler more money as I upgrade to the shiny new VirtualHostX 5. http://t.co/L14ZCemmSj

— keithholjencin February 25, 2014

@SirCalebGrove @clickontyler No problem, great product with VirtualHost.

— SirCalebGrove February 25, 2014

@shrop VirtualHostX 5 is out today. Big upgrade! http://t.co/knheFYiBrt

— shrop February 25, 2014

@mfahydev Awesome update @virtualhostx. The self-signed certs are worth the price of admission. A+++ would buy again (and did)

— mfahydev February 24, 2014

@relequestual .@virtualhostx Updates to Version 5. Includes generating ssl certs for local https. That’s huge for me!

— relequestual February 24, 2014

@cdburgess @virtualhostx 5.0 drops on Feb 25th over @clickontyler! You can now create SSL certs with a single click! Awesome! Thanks @tylerhall!

— cdburgess February 20, 2014

@relequestual @Kathy_Darling I use osx in built apache and virtualhostx… but that’s something you can’t get on windows

Virtualhostx Review

VirtualHostX— relequestual February 19, 2014

@joedawsonnn If you use a lot of Virtual Hosts on your Mac, and you're not already using VirtualHostX… get it! Huge timesaver.

— joedawsonnn February 8, 2014

@ZenoPopovici @thomasfuchs if you’re using Mac, virtualhostx is the best for managing virtual hosts and share local hosted websites with anyone.

— ZenoPopovici January 9, 2014

@robertmiles3 I find myself using @virtualhostx more and more. Rad little app. Great job to the neighbor up the road, @clickontyler!

— robertmiles3 January 9, 2014

Virtualhost Wamp

@Bozzified @tylerhall love the virtualhostx and hostbuddy. takes away annoying out of hosts file and vhosts. Glad to support you!

— Bozzified January 1, 2014

@WatercoolerHobo @virtualhostx Thanks for all your help on this!

— WatercoolerHobo December 19, 2013

@Kev1nMark RT @ws: If you don’t use VirtualHostX, I feel bad for you son. I’ve got 99 VHosts, and it manages every single one.

— Kev1nMark December 7, 2013

@clarkeash VirtualHostX is a nice little mac app for people (like me) who are too lazy to configure virtual hosts themselves. http://t.co/P2AxyMJ65M

— clarkeash November 20, 2013

@ws Went to go check on VirtualHostX pricing and suddenly http://t.co/iVmAO9tqdJ@NateWeiner is everywhere!

— ws November 12, 2013

@matthewcrist I find VirtualHostX to be the easiest way to get Apache vhost dev environment up and running on the Mac.

— matthewcrist November 5, 2013

@shauninman @luxuryluke VirtualHostX is like that but with named local domains so you don't have to remember port numbers if you have a lot of sites.

— shauninman November 1, 2013

@shauninman Finally upgraded from the long dead Headdress to @clickontyler's http://t.co/27cUWZ4jJd Couldn't be happier.

— shauninman October 31, 2013

@sperte Some of my lesser-known, indispensable tools: xScope, LiveReload, VirtualHostX, Droplr.

— sperte October 28, 2013

@matthewmorek @jamiebrittain No, but if you get VirtualHostX you can manage most important part of Apache (vhosts) hassle free.

— matthewmorek October 23, 2013

@matthewmorek @fujo Now that we don’t need MAMP, you can just use VirtualHostX after you’ve got Apache, PHP & MySQL configured to set up sites quickly.

— matthewmorek October 23, 2013

@matthewmorek @fujo Dude, if you need a whole MAMP for a single site… It’s an overkill :-) I used MAMP + VirtualHostX for quick configs.

— matthewmorek October 23, 2013

@relequestual @stupler ah. I use virtualhostx, just because it’s simpler! And liftoff is useful for testing payment gateways

— relequestual October 23, 2013

@sperte One reason I still prefer the free version of MAMP with VirtualHostX: http://t.co/iZTWX7m4Su

— sperte October 23, 2013

@stevesydney I have come to the conclusion that the best alternative to MAMP is to use Homebrew to install php and mysql and use VirtualHostX to manage.

— stevesydney October 13, 2013

@gerbick Customer service like .@clickontyler just gave me for VirtualHost X is why I'll continue to support indie software devs. Thanks!

— gerbick September 12, 2013

@sheldonlendrum one of my top 10 dev apps: @tylerhall's http://t.co/EPpFf1aj0b just got even better !

— sheldonlendrum September 3, 2013

@sergiomajluf There are at least three reasons to use @virtualhostx It's easy, it works really well, and it's support is awesome

— sergiomajluf August 29, 2013

@mikeeeeeeey @michaelw90 @nathggns VirtualHostX is pretty sweet for easy vhosts

— mikeeeeeeey August 7, 2013

@heartboxmb Cannot find the words to explain how much I love @virtualhostx! Some of the best money ever spent, give it a try if you still don't use it

— heartboxmb July 31, 2013

Virtual Host Wordpress

@mattfordham @lealea I recently switched from MAMP to the using VirtualHostX w/ built-in Apache. I found no good reason to stay on MAMP.

— mattfordham July 26, 2013

@shrop Just bought an upgrade for VirtualHostX to version 4. It is a great app to manage vhosts on your Mac. I highly r.. http://t.co/fywx9gIJkz

— shrop July 7, 2013

@iamFinch Apps currently open that I would never have imagined I would be using: SourceTree, PhpStorm, Codekit, VirtualHostX

Virtualhost Vs Mamp

— iamFinch June 26, 2013

Virtualhost 443

@thetinkertrain Although I have to admit to be cheating a little bit with VirtualhostX, as I can't be bother to manually manage virtual hosts

— thetinkertrain May 13, 2013



Coments are closed