Tuesday, December 15, 2009

Setting up a complete web server on your own computer. ( Windows )

Ever wished to have your own web server ? Here is how you can make your dreams come true...
First you need to download 'XAMPP'. The full form of XAMPP is X (meaning cross-platform) Apache HTTP Server, MySQL, PHP, Perl all together, so the name xampp. It is a free and open source cross-platform web server pakage. You can download your copy from here: Download XAMPP.
It is a 44mb file. You will have to scroll down a bit and select EXE from 'XAMPP for Windows' section, like shown in the figure below.
- After downloading just follow the normal procedure of installing which I assume you can do it on your own.
- After finishing the installation process you can run the 'XAMPP Control Panel Application' which will help you to start/stop any services you wish, for eg: Apache, MySql etc.. You may even wish to install MySql or Apache service so that it automatically starts with the rest of your windows services.
- Its easy, you just have to check the square box at the left hand side of whose you wish to install the services. As shown in the figure below.
- Then you may start your web server by clicking on start button besides 'Apache'.
- After doing that visit your web browser and type "YOUR IP" or "localhost" and press enter.
- Choose your language, eg: English / Deutsch / Francais / Nederlands / Polski / etc..
After selecting language a web interface will appear which will help you manage everything.
- Don't forget to set username and password otherwise anyone can visit xampp directory and manipulate your settings. You can set passwords by visiting the 'Security' page. As shown below:
- NOTE: Please don't forget the new password and username!! Or else there is no way other then re-installing the whole XAMPP. One way is to store you password in *.txt file. This option is visible while you set new password.
- After doing all this you can now create your own HTML page and rename it as index.html, index.php, default.php or default.html and move to the folder C:/xampp/htdocs/ . It automatically searches for the above mentioned *.html page and runs when a user visits your 'IP address' in a web browser. **When running xampp for first time there may be a *.php page in your htdocs folder, you can rename it as *.bak otherwise your other html page may not run in browser when some1 visits your 'IP address'.
- The next time when you wish to change any settings for XAMPP you may simply type "yourip/xampp" in address bar which will prompt for username and password. Type in your username and password and login. Now you can make changes whatever you want.

-
I am not going in detail and explaining everything. You may like to research on it and learn, its easy! :) So there you go... You have just setup a web server. :)

No comments: