Compiling NCSA HTTPd


To compile NCSA HTTPd, just take the following easy steps:

Retrieve the Source

First, download the
source. (Note: Some browsers will automatically uncompress the source for you) and use tar and uncompress to decode it.

e.g.: uncompress -c httpd_1.5.2a-export_source.tar.Z | tar -xf -
or: tar -xf httpd_1.5.2a-export_source.tar


Modify the makefiles

If you don't have a supported configuration, or if you want to change the default configuration, you are going to have to edit the Makefile in each of the three directories (support,src,cgi-src). The supported configurations only require typing make from the top level directory and then reading the instructions, picking a system, and typing make again. v1.5 supports the following systems in this fashion: The Makefiles in the support and cgi-src directories is fairly straight forward. The src directory is more fun. If your system is supported, uncomment the AUX_CFLAGS and EXTRA_LIBS line associated with it. There are defines available in src/Makefile for the following systems:
SunOS			Solaris2	Irix		HP-UX	
AIX3			AIX4		Ultrix		OSF/1
Amdahl UTS 2.1		Sequent		Linux		NetBSD	
SCO ODT	SCO SVR3.2	SVR4		NeXT		A/UX
HP/Apollo Domain/OS	AT&T SVR3.2	QNX 4.22

If your system is not listed, you have to modify src/Makefile and the Unknown system section of src/portability.h.


Compile Time Configuration

We've tried to make most of the abilities of the server manageable at run time configuration, but this is not always possible or desirable. For that reason, some of the options are only available at compile time. All of these options can be dealt with by editting either src/Makefile or src/config.h. The ones in the Makefile are generally security related, and often have extra libraries and/or include file directories that are necessary for compilation. The options in config.h are usually no more than a #define, and are fairly well documented in config.h.

Later on in the installation, when you run HTTPd, your system may grind to a halt, as defunct and zombie processes take up more and more system resources. If you see this, you have the wrong setting for BSD.

You can change your settings for BSD in portability.h -- the available options are documented near the end of the file. Modify the section which begins with #...if (your_system_type) and ends with #elif (another_system_type). If you see a #define BSD then you need to change it to #undef BSD, or vice versa.

Chances are that if you system is already defined in portability.h, then it is already set correctly. If you are porting to a different platform, then you will need to figure out which setting is appropriate. For developers: The BSD setting is used for a few things, but the main thing is the way in which SIGCHLD signals are trapped. Under SYSV, they are trapped by SIG_IGN, but under BSD, they are trapped by our own ign() function.


[Back] Return to Installation Overview
NCSA HTTPd Development Team / httpd@ncsa.uiuc.edu / Last Modified 4-09-96