Setting up your Local Server
When you are making a web page, the easiest way of view a page stored in your hard disk is double-clicking in the file, which usually results in the page being opened in your default browser. But this method it’s good enough for simple static pages, it’s not useful if you are using server side languages (PHP, Perl, ASP…), or even for pages that are static but use links relative to the server root (like “/index.html” or “/css/styles.css”). In this situations the solution is either upload the files to the server of your web host or set up a test server in your local network/computer, which is the quick and safe way of testing your design changes. And you don’t need the internet connection for this.
Here I am trying to describe in a simple way how to set up an Apache server on Windows for testing purposes, with the option of include PHP and MySQL. This can be useful even if your web host runs on Linux/FreeBSD/Unix, since the functionality will be more or less the same, unless you use specific OS/server features. It can also be useful for learning and/or testing popular Apache modules like mod_rewrite that are not directly available for other servers like IIS.
Only PHP is covered since is free and widely used nowadays, where ASP is tied to IIS and Perl users probably prefer Linux. The same reasons apply to MySQL. I’m going to describe how to set up a standalone Apache server and then how to add PHP and MySQL, so people that don’t need PHP or MySQL can skip those steps.









Leave your response!