You are on page 1of 8

INSTALLING AND CONFIGURING APACHE

Rahul Panwar CSI-ADM

INTRODUCTION TO APACHE

The Apache HTTP Server, commonly referred to as Apache, is web server software notable for playing a key role in the initial growth of the World Wide Web.[2] In 2009 it became the first web server software to surpass the 100 million web site milestone.[3] Apache was the first viable alternative to the Netscape Communications Corporation web server (currently known as Sun Java System Web Server), and has since evolved to rival other Unix-based web servers in terms of functionality and performance. The majority of web servers using Apache run a Unix-like operating system.[citation needed] Apache is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation. The application is available for a wide variety of operating systems, including Unix, GNU, FreeBSD, Linux, Solaris, Novell NetWare, Mac OS X, Microsoft Windows, OS/2, TPF, and eComStation. Released under the Apache License, Apache is characterized as open source software

INSTALLING AND CONFIGURING APACHE


1.Downloading Apache The first step in installing apache is to download the latest stable release. The best place to get Apache is from the Apache HTTP Server download site. Download the sources appropriate to your system. Binary releases are available as well. 2.Installing Apache Installing the Apache in windows is easier when compared to Linux. After the file is downloaded, we should open it as usual and the setup wizard will open and install the server for us. Since Apache has just started making Windows versions, the code is not as stable as it is for Unix. Windows support is entirely experimental, and is recommended only for experienced users. The Apache Group does not guarantee that this software will work as documented, or even at all. During the installation, we will be asked for

* the directory to install Apache into * the start menu name * the installation type

Typical installs everything except the source code. Minimum doesn't install the manuals or source code, and Custom allows you to 'customize' what is installed. Now to the Unix version. Since we downloaded a "tarball" distribution, we have to decompress it. Simply type tar -zxf apache_1.3.9.tar.gz. A directory called apache_1.3.9 will be created. You will have to go to this directory to proceed to the next step and compile the source code. Compiling the Source With all the source code neatly placed in this directory (and it's subdirectories), you will have to compile it to make it work. Here we will be using the GNU cc (gcc is the shortform) compiler to compile the source. It is free and distributed with most Unix operating systems.

f it is not on your computer, download and install it from http://www.fsf.org/software/gcc/gcc.html. Anyway, once in the apache_1.3.9 directory, from the prompt type ./configure This will create a makefile with the default configuration. To change the configuration, you must edit apache_1.3.9/src/Configuration.tmpl before running configure. You can add/remove modules from the list, and tweak many other options. Normally though, you should just let it use the defaults, especially if this is your first time installing Apache. For more information on editing the Configuration file, check out the README.configure file included with the distribution. Two more command line commands to execute. Type make to compile the server, and

make install to put it in the proper directories. The default is /usr/local/apache/, though this can be changed in Configuration.tmpl. Now that your Apache binaries have finally been installed, we can proceed with learning how to use them. Using Apache

After all of this work, we are now ready to start running Apache. There are obviously two methods for running it, one is for Windows and the other is for Unix. Windows Since Apache is just another Windows application, just go to the start menu, then the Apache Web Server program group. If you are not running Windows NT, just select "Start Apache as console app". If you are running Apache on NT though, you can hit the "Install Apache as Service (NT only)" option and Apache will be installed as a service on your computer. This means it will automatically start everytime NT is booted up.

Configuring Apache
Though it is generally thought to be scary to edit a configuration file for anything, for Apache, it doesn't have to be. The configuration can be found in the apache_1.3.9/conf/ directory, and, though there are a bunch of files available, you only really need three of them. Firstly, there is httpd.conf, which contains directives and configurations relating to the operation of the server as a whole. For example, server logs and server management. Next on the list, there is srm.conf. This file contains the configurations for the management of resources in the filesystem, such as aliases, directory indexes, etc.

Lastly, access.conf. This file contains information on access control in

When you first install Apache though, the files are not named exactly like this, they seem to be named name.conf-dist. This means it is the distribution copy of the file. Since we like to have backup copies of anything and everything, just use a command similar to this (from unix) cp httpd.conf-dist httpd.conf Or, for windows, just copy the file, and rename it. Another note, before we begin, you must restart Apache before any changes to the configuration files take effect. This is because the files are loaded upon initiation, so these changes will not be loaded otherwise.

You might also like