I use Uniserver.
It has this feature built in.
It's that simple.
The Uniform Server is a free lightweight WAMP server solution for Windows. Less than 24MB, modular design, includes the latest versions of Apache2, Perl5, PHP (switch between PHP53, PHP54, PHP55 or PHP56), MySQL5 or MariaDB5, phpMyAdmin or Adminer4. No installation required! No registry dust! Just unpack and fire up!
It even runs off a flash drive. Has cron emulation, support for perl, mariaDB, a couple versions of Mysql, filezilla server and a few other things.