Setting up a Test Server on Your Own Computer

This article will take a beginners look at this interesting subject. It will give you the information that you need to know most. When you're developing a website, you require to see it in action on a truthful server, to see how it will work. While you could upload your pages to your web multitude every time you make a change, this quickly gets time-consuming and tiresome. Wouldn't it be great if you could have a little test server of your own? Well, the server is nothing but a sample of software so you can! Please note that, for the purposes of this article, I will assume you're with Windows as your operating system. Installing an IIS analysis Server. While with IIS isn't recommended, a test server is very simple to install. All you require to do is open 'Add or subtract Programs' in Windows' limit panel. All you require to do is click Internet Information army (IIS), click OK, and you're done. If you feel that you havent learned anything new thus far, there is a whole new realm of information in the rest of this article. Of course, there are downsides to this. Many versions of Windows don't come with IIS, and there's no way to invest it on them Windows XP Professional, for example, comes with IIS, but Windows XP Home does not. You might also want to believe that installing IIS on your computer will often make it fewer secure. Installing an Apache analysis Server. Compared to installing IIS, installing Apache is hard Linux distributions all have relatively simple ways of liability it, but Windows wasn't intended for it. To get Apache installed, then, you're available to require to have a little fight with the system. Note: If you want to skip all the next steps, you might believe with an 'easy installer' type of Apache, such as XAMPP (for Windows), which you can get at www.apachefriends.org/en/xampp-windows.html. The downside to this approach is that you will be relying on them to impart new releases, instead of being able to revise things yourself. First of all, download Apache from http://httpd.apache.org/download.cgi. Make sure you download the Windows Installer (MSI) version. You'll find it easiest to make the server run as a service, as this will make it run automatically Apache will occur in your system tray (in the bottom-right place of your screen). Now, you require to find your Apache configuration file. In the folder where you installed Apache, look for another folder named 'conf', and then a troop named 'httpd.conf'. Open this troop and look for a setting called DocumentRoot. You should change this to direct to a folder on your hard drive, such as 'c:/html'. Now, you've got Apache, but that's not typically much good on its own. The odds are that you'll want to invest PHP and MySQL as well, so here's how: Download PHP from http://www.php.net/downloads.php. Again, go for the installer. Once you've installed PHP, find its folder, and rename the php.ini-dist troop there to php.ini. Find the 'doc_root' setting there, and set it to the same thing you set Apache's to. Back in Apache's httpd.conf, you should add these lines: LoadModule php5_module "c:/php/php5apache2.dll" AddType application/x-httpd-php .php PHPIniDir "c:/php" If you didn't invest PHP in c:\php, change the outline above to mirror where you put it. Now, installing MySQL isn't as difficult, because it runs independently of your Apache configuration. Download MySQL from dev.mysql.com/downloads. Again, get the Windows installer version. This installer has a lot of settings, but you'll be adequate if you just click Next through them to accept all the defaults. The only remaining stride is to allow MySQL encourage in PHP. print libmysql.dll troop from c:\php to your Windows\System32 folder, and then open the php.ini troop you shaped before. subtract the semicolon from the jump of the line that says ';extension=php_mysql.dll', and collect the file. Shut down Apache and resurrect it, and you're done! Visiting Your Server. When they've installed a server on their computer, many people question how they can access the server they just installed as if they were visiting it over the web. The answer is simple: just open your web browser, and go to this URL: http://localhost (you can also use http://127.0.0.1). This special address means 'the server on this computer'. You'll know if you installed Apache successfully because you'll see a page congratulating you. When you change your web pages, just use your browser's Refresh button to see the effect. No matter which way you look at it, having a firm understanding of this topic will benefit you, even if it is just slightly.