News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint Web Tech Blog:
How to Test Multiple Websites on One PC With Apache Virtual Hosts
April 24, 2009 @ 10:24:31

On the SitePoint.com Web Tech blog, Craig Buckler explains how you can test multiple PHP/MySQL/Apache websites on your local machine without having to change your Apache configuration each time - the magic of VirtualHosts.

It is rare to find a web developer with responsibility for just one website. In this article, we will configure your development PC so you can test any number of websites using a dedicated domain name for each one. You will require a local installation of Apache 2.2 and, optionally, PHP and MySQL.

He explains the only two parts you'll need to get it up and running - changes to your hosts file and updates to the Apache configuration file to add in VirtualHost records for each site. He also throws in a bonus tip about detecting which host the script is being used on via the $_SERVER['HTTP_HOST'] variable.

0 comments voice your opinion now!
multiple website apache virtualhost tutorial host file configure


blog comments powered by Disqus

Similar Posts

Mike Dalisay: Salt, Hash and Store Passwords Securely with Phpass

Gergely Hodicska's Blog: What's new in PHP 5.3 - part 1: namespaces

Indra Dutta's Blog: Top 5 reasons why PHP is a better choice than java & .NET for most websites

DevShed: Performing Strict Validation with the Code Igniter PHP Framework

Zend Developer Zone: Using the Twitter API with PHP and PEAR


Community Events





Don't see your event here?
Let us know!


release voicesoftheelephpant extension laravel language symfony composer series interview configure list introduction api community install unittest conference opinion version podcast

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework