Apache Installation

Tuesday, December 2nd, 2008 admin

To install Apache web-server please visit http://https.apache.org and download installation package. By default Apache will be installed to the c:\program files\apache group\apache2. Here there is a folder “conf” where configuration files of Apache are located.

Inside “conf” folder you will find the file httpd.conf. This file contains configured parametres of Apache and you have to edit it to include PHP. First, search for strings named “LoadModule”. There are some such strings and add the new one in the end:

LoadModule php5_module c:/php/php5apache2.dll

If you installed your PHP in another folder you have to write it above.

The next step – find string “AddType”. And add new one:

AddType application/x-httpd-php .php

This string connect our scripts which have .php extension with our PHP module. You may add many extensions here.

Basic Apache installation is completed. If you do Start->Run and enter services.msc you will see a list of Windows services. Find Apache2 service and press a button with Stop and Play symbols to restart this service. Now your PHP is on.

After restarting of Apache open your browser and go to http://localhost. And you have to see a notice something like this “If you can see this, it means that the installation of Apache web server software on this system was successful”. HTML directory is c:\program files\apache group\apache2\htdocs. Now it is done! Apache and PHP work together and you may start writing your php web pages now.


Leave a Comment

You must be logged in to post a comment.

« | Home | »