Well i had developed a curiosity these days on server scripts especially PHP & MySQL. I coded them and essentially had to transfer them to a remote server and test it online. I found this way of testing really long and torturous. There i decided to make a server out of my own computer and setup a "localhost". Apache provides a very handy software to setup your own personal localhost sever. It essentially means that you have made a server out of your computer. Point to note is that it will not work like the orthodox servers that are available on the internet. It will just locally enable you to run your server scripts (scripts that will work only on server and not on your normal computer).
Apache2 gives away a smooth running software to set your localhost.You will understand it better if i say that, once you setup your local host you will see a valid page if you type "http://localhost/" even when your internet connection is off. well and the localhost will point to many directories within its root directory and you can address a file namesd TEST.HTML within the local directory as "http://localhost/test.html" . Well this is it about html which will run on a normal computer imagine it being test.php instead of test.html then the php will not run on your computer before you setup apache.. Once you setup apache then you be able to run the PHP(WIth few more aditional changes beyond just apache) in your computer a s "http://localhost/test.php" !!
HERE IS THE EXACT WAY YOU DO IT
Please download the exat version i suggest to keep all possible mistakes off. I had struggles with various version available on the internet finally to end up finding one perfect method to set it up. i had almost spent a week analysing most available methods to find the best and the easiest way to set it up.
1) INSTALL :
Download under the option "Apache HTTP Server 2.0.58 is also available" and download the fourth option
"Win32 Binary (MSI Installer): apache_2.2.2-win32-x86-no_ssl.msi"
When you install Apache, you'll get a prompt for "Server Information." Here is the settings I used:
Network Domain: localhost Server Name: localhost Admin Email: (your any email)
Recommend checking: "for All Users, on Port 80, as a Service"
Note where it is installng say "C:\Program Files\Apache Group\Apache2"
3) After installing, Apache2 automatically starts. The icon in the System Tray means it started. The icon means the "Monitor Apache Servers" is running, but Apache2 isn't started.
You can easily start/stop/restart Apache and Apache2 via that icon in your System Tray. If you get "The requested operation has failed!" error while starting apache use the "Test Configuration" shortcut in the Start Menu to find the error (if the text window pops up then closes before you can read it, your config file is fine).
If it shows the Test Page for Apache Installation you have your server software installed and running.
If YOU SEE THIS AS BELOW THEN YOU HAVE SUCCSFULLY SET THINGS UP
Note that this is the index file in the location "C:\Program Files\Apache Group\Apache2\htdocs". Goto this location and change the "index.html"to the one of your wish and see it reflect when you goto "http://localhost/"
If you create a folder say "TEST" inside the htdoc then you create "server.html" insode that folder then you can access the server.html by the address "http://localhost/TEST/server.html"
I guess you got the whole concept of it and get goint o set up your own server.THe most important utility if setting up a server is to set it up compatible to PHP,CGI,MySQL and other server scripts. I will soon follow about how to set those onto your server. Keep a watch at this space
P.S:- Please not that you still are not configures to run server scripts. I'l teake you through that a bit later. As of noe you can test HTML by addressing like "http://localhost/" or "http://127.0.0.1/"