PC as Web Server for Dummies
This is a dummies guide to converting your PC as a web server. We will be installing a Apache web server, PHP and My SQL database server. These are the same things that are installed on my linux server, hence I would recommend these as well. Without much delay, lets get started.
Apache Web Server
Download a copy of the latest windows 32 binary from this link. Make sure you download the latest copy and you download a file that has an extension “msi”. Save the file to your disk and execute it. Hit nexts until you get to this screen.
Enter the fields as I have entered and hit next. Do a custom installation. Hit change to change the place where your server files are going to be stored. I typically like to store them on c:\www.
Hit next, install and finish the installation. To check if the installation is successful, open firefox (or IE) and in the address bar type http://localhost/ and you should see a message that would say “It Works”. Remember, your windows firewall might ask you if you want to block the server program. Hit Unblock. This step is very important.
Your server files are located in this folder : C:\www\htdocs. This is where you would store all your webfiles.
MySQL Database
Download the windows MySQL installer from this location. There is an optional signing up process to download the file. For my demo installation, I am not downloading the essentials but the regular one.
Execute the file after downloading. Select custom installation. Click on mysql server and select the destination folder as shown in the figure.
I preferred not to sign up with mysql for their updates. If you need information about updates, go ahead and signup for mysql.
Proceed with mysql configuration. Choose standard configuration.
Enter a root password as shown in the figure below.
Hit execute and you will see that it completes four tasks with check marks next to them. Hit finish. This completes the installation of mysql server on your PC. Lets proceed to test if the installation does work.
Click on start -> programs -> mysql -> mysql command line client
This should bring a command prompt window which would ask you to enter a password. Enter your root password and hit enter.
PHPMyAdmin is a web based GUI utility which helps you create tables and do everything you need to on database structures. I started writing about its installation but I found this website which had detailed installation procedure for PHPMyAdmin. I would recommend using PHPMyAdmin.
PHP
Download the windows PHP installer from this site. I have worked with different PHP versions and I like the latest one the best. But, feel free to download an older one if you wish to use it.
After you download the installer, execute it and after a couple nexts, select advanced installation.
Follow my example for selecting the folder in the image below.
Hit a few more nexts until you come to the screen that is shown below. Deselect Microsoft IIS and select Apache.
After a few more nexts and OKs, the installer will end. But we are not done yet.
We値l be setting PHP up as a CGI binary as it痴 the simplest to setup and get us moving quickly. Further down the road once we learn more about PHP and want to advance more, we値l probable change this to an Apache module.
Now we値l need to edit the httpd.conf file, which is located in the conf folder on Apache2 installations. Once the httpd.conf is opened we値l need to add a few lines of code to the very bottom of this file to allow PHP to load and work correctly.
Download the file php5apache2.dll from here. Make sure that you place the file in the php folder. Also double check to see if you have php.ini in your windows folder.
AddType application/x-httpd-php .php
LoadModule php5_module “c:/php/php5apache2.dll”
AddType application/x-httpd-php .php
PHPIniDir “c:/windows”
This is a safer way of integrating PHP with Apache. There is another cgi method which is easier but is a security threat.
We値l want to create a file in the htdocs folder located in the main folder of Apache. This is where all of our web documents are going to be stored. Create a new file in this folder can name it phpinfo.php. Be sure that it saves with a .php extension and not .php.txt or whatever you値l use to create the file.
Once the phpinfo.php file has been created, open it up and place the following code within it.
<?php phpinfo(); ?>
Save it close the file and then open your favorite browser and type this in the location bar.
http://localhost/phpinfo.php The output should look like this :
This video shows a second way of testing your php.
Related posts:

This is a very informative article, but you make no recommendations, even basic ones, for security.
It would be good to see a follow-up article on how to do some basic lockdown on the newly installed system to prevent hacking from the outside.
WebServer for Mac for Dummies
1. In System Prefs, click WEB SHARING.
2. Done.
I just want to congrat the people who made this guide, it’s undoubtably very well explained and i couldn’t had started without it.
Thanks a lot and i wish you the best :)
Great guide..
but there is one thing I still can’t figure out
how people can connect to my website without using my IP as my website address
i want to use something like http://www.waq.com
because I in a college..and basically we connect to each other using IP add and we using LAN connection
is this can be done?