Why use Apache?

OPEN-SOURCE! How about that? Yes, it’s an open-source project so it’s absolutely free to use. And not just free but take note, it is powerful, efficient, secure, flexible and fully-featured web server available on the net.

And unless you are creating ASP.NET applications on Microsoft IIS, it is likely that your web host uses Apache server as well. Apache is the web server used by most web hosts and the most preferred web server by both developers and users.

Built as part of the Apache Software Foundation, Apache web server was created by a group of volunteers located all across the globe in an effort to create a robust, commercial-grade, featureful, and freely available source code implementation of an HTTP (web) server.

It’s main goal is to provide efficient, secure and extensible server that provides HTTP service that is compliance of the current web standards.

And why from being a superhero I shifted my interest on the triple W? Come on now, just like Oprah, I’m feeling really 21st century, lol.

Now, in this issue of MKmA, I’ll teach you how to install Apache server on your pc. I have blogged about it in my previous post that ‘farting is my only way of relaxation” for the past few days due to the toxicity of my schedules. That's because I will be involve in the development of a new system that would use Apache, PHP and MySQL in the coming days not to mention all these platforms are all so new to me, ha-ha so goodluck to me, lol. And to get myself familiarized with the new platforms, part of my daily routine now is helping myself with the new programming.

Now, I will share you what I have learned so far… **Drum roll, please**

How to install an Apache server, lol! But take note this version I will be installing for you is the Windows version, since I am using one and since most Linux users will probably have Apache pre-installed or already available in the base repository of their pc. While Mac OSX already comes with Apache and PHP though they need to enable them manually.

So let’s focus on the Windows version. And I’ll be making it as simple and short as possible.

  1. First you have to download the MSI Installer Package of Apache by visiting this link and choose a mirror for your desired location for download. And it’s hard to choose which location to start when you are seeing a lot of them and with a confusing descriptions right, but being my loyal readers provided there's one (lol), I don’t want you to get lost with all those links. So here is the direct link for the download. Come on, try it. The filename should be httpd-2.2.16-win32-x86-no_ssl.msi, this is the current version as of to-date.
  2. After downloading the file, it’s time to install. Take note that as installation process goes some parameters should be supplied. Here are some parameters need to be set while installing Apache server.
    • Network Domain : localhost
    • Server Name : localhost
    • Admin Email: (any email. Real or fake)
    • [checked]: for All Users, on Port 80, as a Service
  3. After installing the Apache, the server automatically starts. In the bottom left corner of your icon tray, Apache icon will now displayed and when an icon appears to be like this , it means the server is running but if the icon displayed similar to this one then obviously the server is stop. You can easily start/stop/restart Apache via icon tray, if you get “The requested operation has failed!” error while starting, 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).
  4. But the ultimate test if your Apache server is working, is this. Open your browser and type or http://localhost/. If it shows the page that reads It works! then your server is working and ready to use.
  5. Now, by default, Apache return files found in its htdocs folder as subfolder of the Apache Software Foundation directory. While this is okay but in times that you need to re-install the application, chances are you will be deleting your previously made pages. So it is recommended to create a new folder outside the Apache directory, let see you have created a partition disk and assuming the location is drive D and in order for the Apache to automatically save the file to your partition disk, we have to set it by changing the configuration and how to do this?

    Now assuming under your partition disk you have created a folder called myWebPages and you want to save all the pages you created on this folder while working on your Apache server. By going through this path C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf will send you to the configuration file. Now open it with your notepad and let's change some of the lines.

    Look for the word DocumentRoot by using the Find keys on your Keyboard, we are going to change this line DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs" to DocumentRoot "D:/myWebPages".

    Now scroll down, we have to change another line just like we have done in the DocumentRoot. This time, this one < Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs" > and we will be changing it to this < Directory "D:/myWebPages" >. Now save the file and restart your Apache server.
  6. Now, to double check if it's really working. Compose a simple HTML code and name it as index.html, it should be saved at the root directory of your Apache server which is D:/myWebpages.

    Open your browser and type or http://localhost/. Your browser should return or display a page similar to this.
Uh I hear, easy!

So that's it kid, maybe in my next post I will be helping you installing the PHP. So until then.


Thanks for the great information you provided,
new emerging