wiki:ndg_security/Apache2/SourceBuild

Version 1 (modified by pjkersha, 9 years ago) (diff)

--

Apache2 for ndg_security - Build from Source

See wiki:Apache2?

Build and Install

Ref:  http://httpd.apache.org/docs/2.2/install.html

  1. Download Apache2 source from  http://httpd.apache.org/download.cgi.
    $ mkdir ~/downloads
    $ export http_proxy=http://wwwcache.rl.ac.uk:8080
    $ wget http://apache.mirror.rbftpnetworks.com/httpd/httpd-2.2.14.tar.bz2
    
  2. Unpack:
    $ tar jxvf httpd-2.2.14.tar.bz2
    $ cd httpd-2.2.14
    
  3. Configure enabling the following optional modules and with default target location /usr/local/apache2:
    $ ./configure --enable-proxy --enable-ssl --enable-rewrite --enable-mods-shared --enable-proxy-ajp
    
    Avoid the --enable-maintainer-mode option to prevent issue listed  above
  4. Build and install:
    $ make
    $ make install
    
  5. Nb. You can double check which modules have been compiled into the executable with:
    $ /usr/local/apache2/bin/httpd -l
    

SysV Init Script Configuration

Back-up the default init script and make a link to apachectl in the new installation:

$ cp -r /etc/init.d/apache2 /etc/init.d/apache2.SuSE.default
$ cd /etc/init.d
$ ln -s /usr/local/apache2/bin/apachectl apache2

Note that the static HTML content directory is now /usr/local/apache2/htdocs.