Pick a Free OS

User login

Navigation

Apache installation and configuration

Email: 

will output several lines on the screen. Essentially this command creates the

Makefiles for the build according to your system configuration. If there are

errors in configure, you may be missing some header files or utility programs

which you must install before proceeding.

5. Compile Apache.

Once configure runs successfully you can compile Apache using the make command

$ make

This will output several lines on the screen indicating that it is compiling

and linking Apache. This should normally conclude with no errors, however if

any errors occur, they will usually be caused due to missing utility programs

or libraries. The Apache FAQ has some pointers if you get stuck

(http://www.apache.org/docs/misc/FAQ.html)

6. Install Apache

Apache installs itself in /usr/local/apache by issuing the command

$ make install

If this concludes successfully your system now has Apache installed. You

should see Apache's installation files in /usr/local/apache and the main

configuration file in /usr/local/apache/conf called httpd.conf

7. Configure Apache

Apache is configured through a single file /usr/local/apache/conf/httpd.conf.

This file consists of a number of Apache Directives, which determine the

various operating parameters of the Apache server. For purposes of a simple

installation, you will need to modify only a few directives described below

DocumentRoot - This is the location of the directory from which HTML files are

served. You can replace the default by any directory. The directive,

DocumentRoot "/usr/local/apache/htdocs"

instructs Apache to serve files from /usr/local/apache/htdocs. In other words,

when you try and access http://servername/somepage.html in a browser, Apache

will serve the file /usr/local/apache/htdocs/somepage.html.

Directory options - Once the DocumentRoot is defined, you must instruct Apache

how to serve and handle various files found in that directory. This is

achieved by modifying the Directory directive. The Directory directive has

various options such as execution of server side includes, whether to follow

symbolic links from the directory, access control to the directory etc. In our

configuration file, we need not change anything.