Major servers are the programs that provide content or services to users or other programs.
The Apache package contains an open-source HTTP server. It is useful for creating local intranet web sites or running huge web serving operations.
Download (HTTP): http://www.apache.org/dist/httpd/httpd-2.0.54.tar.bz2
Download (FTP): ftp://ftp.tux.org/pub/net/apache/dist/httpd/httpd-2.0.54.tar.bz2
Download MD5 sum: 4ae8a38c6b5db9046616ce10a0d551a2
Download size: 5.4 MB
Estimated disk space required: 91.6 MB
Estimated build time: 1.7 SBU
Berkeley DB-4.3.28 or GDBM-1.8.3, OpenSSL-0.9.7g, OpenLDAP-2.2.24, expat-1.95.8 and Doxygen-1.4.3
For security reasons, running the server as an unprivileged user and group is strongly encouraged. Create the following group and user using the following commands (as root):
groupadd -g 25 apache && useradd -c "Apache Server" -d /dev/null -g apache \ -s /bin/false -u 25 apache
The following patch will define the layout of destination directories and, among them, the build directory at /usr/lib/apache/build. This will allow the modules added to Apache to be configured without errors. Apply the patch:
patch -Np1 -i ../httpd-2.0.54-config-1.patch
Build and install Apache by running the following commands:
./configure --enable-layout=FHS --enable-mods-shared=all && make
This package does not come with a test suite.
Now, as the root user:
make install && chown root:root /usr/sbin/{apxs,apachectl,dbmmanage,envvars-std,envvars} \ /usr/include/apache/* /usr/lib/apache/httpd.exp \ /usr/share/man/man1/{dbmmanage,htdigest,htpasswd}.1 \ /usr/share/man/man8/{ab,apachectl,apxs,httpd}.8 \ /usr/share/man/man8/{logresolve,rotatelogs,suexec}.8 && chown -R apache:apache /srv/www
--with-expat=/usr: Uses system installed expat. If you have installed expat and do not use this switch, the Apache installation may overwrite some files from the expat installation.
--enable-mods-shared=all: The modules should be compiled and used as Dynamic Shared Objects (DSOs) so they can be included and excluded from the server using the run-time configuration directives.
--enable-ssl: Use this switch to create the mod_ssl module and enable SSL support.
chown root:root ...: This command changes the ownership of some installed files, the result of building the package as a user other than root.
chown -R apache:apache /srv/www: By default, the installation process installs files (documentation, error messages, default icons, etc.) with the ownership of the user that extracted the files from the tar file. If you want to change the ownership to another user, you should do so at this point. The only requirement is that the document directories need to be accessible by the httpd process with (r-x) permissions and files need to be readable (r--) by the apache user.
The main configuration file is named httpd.conf. Modify it to run the server as a dedicated user:
sed -i -e "s%User nobody%User apache%" \ -e "s%^Group #-1%Group apache%" \ /etc/apache/httpd.conf
See http://httpd.apache.org/docs-2.0/configuring.html for detailed instructions on customizing your Apache HTTP server.
There's a problem with the ISAPI DSO module caused from compiling with GCC-3.4.3. Comment out the module from the configuration file with the following command:
sed -i -e "s/^LoadModule isapi_module/# &/" \ /etc/apache/httpd.conf
If you want the Apache server to start automatically when the system is booted, install the /etc/rc.d/init.d/apache init script included in the blfs-bootscripts-6.1 package.
make install-apache
Last updated on 2005-08-01 13:29:19 -0600