How to install the Apache server, with screenshots

Practice




This article describes the process of installing and initially configuring, on a local computer running the Windows XP operating system, the well-proven set of programs used to build both large and mid-sized web projects: Apache, MySQL, PHP, and phpMyAdmin.


Developer's site: http://www.apache.org

Distribution: http://www.apache.org/dist/httpd/binaries/win32/httpd-2.2.15-win32-x86-no_ssl.msi


Here it is – the great and terrible. Over the years it has claimed the lives of many novice web developers, who laid down their heads trying to configure its config files. :) But you and I are people of strong nerves and steel stomachs, so let's go.

Installing the Apache web server, with screenshots


Fill in the form as shown in the screenshot.


How to install the Apache server, with screenshots




How to install the Apache server, with screenshots
Choosing "Typical" installs everything necessary for the server to work fully.

In this window you can choose the directory to install the server into.

If everything went successfully, an icon of a feather with a blue arrow should appear in the taskbar next to the clock, indicating that the Apache service is running. But don't celebrate yet, this is only the beginning. :)



How to install the Apache server, with screenshots

First, right-click the feather icon in the taskbar and select "Open Services". In the services management window that opens, select the "Apache2.2" line and double-click it, then on the "General" tab choose manual service startup - "Startup type: Manual". This needs to be done so that unnecessary services don't load down the system. Given that a home computer is used not only for web development but also for many other needs, manually starting and stopping services that aren't used all the time is the most sensible approach.



You need to create a directory called "apache" at the root of the drive - it will hold your virtual hosts (domains), the global error log file "error.log" (created automatically by the program on first launch), and the global access log file "access.log" (created automatically). Inside the "apache" folder, create another empty folder - "localhost", inside which, in turn, create a "www" folder - it's this last one that will hold your local scripts. This directory structure, which might seem odd at first, is modeled on the similar directory layout used in Unix systems, and is meant to make it easier to understand and use going forward.



Next, in the directory where Apache was installed, find and open in a text editor the file "confhttpd.conf", which is Apache's main configuration file. Now brace yourself. Women, the elderly, and children are asked not to read further. The authors are not responsible for the mental state of anyone who reads the article to the end. :)



Take the file from httpd.conf and copy it into the folder where Apache is installed


c:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf

Take the file from httpd-vhosts.conf


and copy it into the folder where Apache is installed

c:\Program Files\Apache Software Foundation\Apache2.2\conf\extra

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Running server side scripts using PHP as an example (LAMP)"

Terms: Running server side scripts using PHP as an example (LAMP)