Installing a Webserver
If you want to test scripts, but don't have room for it on the net, you can install a web server on your own computer. First it's free and second it's not accessible from outside. This tutorial will be made in parts, since it's a kinda big one and you have to install a couple of programs.
This tutorial has been written with use of Windows XP Home Edition SP2.
For this complete tutorial you'll need:
- Apache 2.0.58 or later
- PHP 4.4.2 or later
- MySQL 4.1.20 or later
- phpMyAdmin (optional)
¤ Step 1: Installing Apache
Apache is the most used server application available free for download. First download Apache 2.0 from here. Choose apache_2.0.xx-win32-x86-no_ssl.msi (where xx is the version number). After downloading it, open it and setup will start and the following screen will appear:
This is the standard welcoming screen, just press "Next".
Here the license agreement is displayed, read it if you're bored.
Press "Next" when you're done.
Here will be explained what Apache is, read it well. Press "Next" when you're done.
Here enter your server info, just be creative.
Just keep the first option selected and click on "Next".
I recommend using Typical as setup type, if you are a beginner with this.
Click "Next" when done.
Here you can change the directory you want to install Apache in. Click "Next".
You're done with the wizard.
By clicking "Install" the program will be installed. (duh)
The program is installing, please wait. Some DOS windows will appear, just ignore them, since they are part of the install. If you firewall starts complaining, allow the program to act like a server.
Congratulations, the installation has been complete.
Click "Finish" to exit the installer.
To test if the web server works, open your browser and go to http://localhost or http://127.0.0.1. This is the IP address of your computer. If everything works the following page should appear with this text:
It Worked! The Apache Web Server is Installed on this Web Site!
Please note, the text will likely appear in your own language.
If you want to change the directory you want your documents to be read from, go to Start » Programs » Apache HTTP Server 2.x.xx » Configure » Edit the Apache httpd.conf Configuration File.
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
Replace it with (change the location to something else if you want):
Now that your webserver works you can add your website to it. But only in HTML language. If you want PHP and MySQL installed too, continue to step 2.