Monday, December 16, 2013

SetUp Apache WebServer in Windows


If you ever felt curious and wanted to setup a webserver at your home computer, then I know for beginners, it really gets into nerves without knowing where to start from. Apache is an opensource tool that many servers use for webserver. Anyone can use it for free. You can go to http://httpd.apache.org/ for more info about Apache, like the latest version. For use purpose, it is convenient to download the latest version from ApacheLounge, because they keep the latest compiled Apache installer. You can download from the official website of Apache as well, but later you may find some troubles. so, since most people refer ApacheLounge,let's work with their latest version of Apache. Let's get started to install the latest Apache in your computer.

Steps:

  1. Go to http://www.apachelounge.com/download/. You may want to read the texts there to get more idea of what they are offering there.

  2. Look for the latest version of Apache (zipped file under binaries). You can download either 32-bit or the 64-bit but, 32-bit is preferred to stay away from troubles.

  3. Also, look for the requirements.Generally the requirement is the Visual C++ Re-distributable.    
    **Which Re-distributable?? Depends on which version of VisualStudio was used to compile. Read the end of the text at the top of the page, there will be the link for the redistributables. Download respective version and x86 or x64 and install it.

  4. Unzip the downloaded Apache file.

  5. You should see a folder names "ApacheXXX", where XXX refers to the version (example "Apache24". Copy the folder to C:\

  6. Open command as administrative.
  7. ***How to open command in Admin privilidge? Simply, click on start and look for command. Then, right click on the icon and click "Run as Administrator".

  8. In the command, type "cd c:\Apach24\bin" to change directory to c:\Apach24\bin. Here, replace "Apache24" with the real name of the folder.

  9. Type (without inverted commas) "httpd.exe" and press ENTER to run the server

  10. Type "httpd.exe -k install" and press ENTER to install the server

  11. Open Chrome or Firefox or Internet Explorer and type "localhost" and press ENTER. If you see "It Works!", then you have successfully installed the webserver.
  12. Exit command console


  13. Run ApacheMonitor.exe in the folder "bin" and copy it to Startup folder so that the server starts up everytime you boot thecomputer.

Setup Webserver successfully? Now what?




Know more related:
  1. Setting up PHP

Sunday, December 15, 2013

Setting up PHP




1. Go to http://windows.php.net/download/

2. Download respective php zip (x86/x64 and vc11/vc9 should match to the apache installed)

3. Extract and copy the files under C:\PHP

4. Make a new copy of "php.ini-production" and rename it to "php.ini"

5. Go to Apache folder

6. Open "conf" folder and edit "httpd.conf"

7. At the end of the file add the following

<IfModule mime_module>
           AddType application/x-httpd-php .php
</IfModule>
PHPIniDir "C:\PHP"
LoadModule php5_module "C:\PHP\php5apache2_4.dll"
8. Change the .dll name with right one




Know more related:
  1. Setting up Apache WebServer