Create your own Webserver

Create your own Webserver
1st January 2009 No Comments Uncategorised admin

You may have come across several websites on the internet,they run on a webserver.A Web server is a computer program that delivers (serves) content, such as Web pages, using the Hypertext Transfer Protocol (HTTP), over the World Wide Web. Generally to create webserver either Apache or IIS is used.Apache is a free software under GPL license,whereas IIS comes with Windows OS.

In this article you will learn to create a webserver and will also learn how to manage a website.


When you are creating a website three things you require i> a running webserver on website runs

ii>Database package/system which manages the tables and database of the website.(We are going to use mysql as the database package as it is free to use. iii>The Server Scripting language which will be used to generate dynamic pages.Of course for the client side scripting we have javascript.But at many times we will be required to send request to the server and wait for the response.For this we would be using PHP language which is free.


Now the good thing is that instead of downloading these things seperately and tweaking the configuration files to make them work together ie. Apache,mysql,php there is a package which comes with all these things inbuilt together ie. XAMPP.Just google xammp and download xampp for windows.After downloading XAMPP click on the setup to install it.


Installation of XAMPP


XAMPP comes with these things:


  1. Apache web server

  2. Mysql

  3. PHP engine

  4. FileZilla(File Server). Dont need to install it.

  5. Mercury(Mail Server)Also dont install it.

  6. Phpmyadmin(A small appliaction to manage your webserver,and create and mange databases easily.)


Also while installing XAMPP, select the installation type as custom to select the exacy features which you want to install.For. Eg. Mercury & FileZilla are not required.


Also install Apache,MySql as a service.


After installation,run http://localhost.


If you are able to see the phpmyadmin page then your xampp has been installed successfully and your server is up.

By using this you can create databases if you want and also try sample php scripts that ships in which XAMPP.

At times you wont be able to see the phpmyadmin page which means that there is some problem.

At times if your IIS is up,(IIS runs in port 80) then apache wont start up.So now then you have two-three options


  1. Go to services.msc(type it in run) and press enter.Disable the IIS Admin service. Or better disable the service permanently by typing msconfig and pressing enter.Go to services tab and disable the service IIS admin permanently.

  2. Go to the apache folder ,Generally the folder is installed at c:\xampp\apache, go to conf directory.Find the http.conf file.Open it(This apache configuration file).Now we will try to change the port.Find the Line Listen … After finding it Change it from Listen 80 to Listen 81.

    Now you have set your apache port to 81.Save the file and restart the apache.You can do so by going to services.msc and restarting the service.Or you can you the control panel that came up with apache.



Manging Mysql


Now using the phpmyadmin create any mysql database if you want.PHPMyAdim is a GUI tool, you can execute almost all the sql commands in this.By default mysql runs at port 3306.At times it may happen some other service is running at this port.So either disable that service or configure mysql for a different port.At times,due to previous instance of mysql installed and not removed properly this problem may occur.For that go to command prompt and type in sc delete mysql.

SC utility comes with XP and above versions.This command can communicate with various network services.


After all this is done.You can place your php files in htdocs folder to execute them.Also by default index.php is called whenever you run the webserver. So you can create your own page like g.php and place a code in index.php to redirect it to g.php. Or you can delete that index,php can create your own index.php.


Also to get the best out of your webserver install any cms like drupal.For configuring apache and install stay tuned to some of my next tutuorials.

About The Author

Leave a reply

Your email address will not be published. Required fields are marked *