10 thoughts on “Installing Apache Web Server from Source Code in Linux

  • im run "httpd-2.4.52" this "apr-1.7.0" "apr-util-1.6.1" both are file rename and move the httpd-2.4.52 after run this with different path
    #./configure –prefix=/web/httpd
    #make
    #make install
    service can start and stop but my page not load

  • Could you help me I'm install wrong path of Apr & apr-utils I want to uninstall Apache, this is possible or not?

  • Hi Chandra,

    I have followed as per your instruction/videos, but getting this error .

    z/httpd-2.4.34/srclib/apr-util/include -I/home/nexteon/installSw/tar.gz/httpd-2.4.34/srclib/apr-util/include/private -I/home/nexteon/installSw/tar.gz/httpd-2.4.34/srclib/apr/include -o xml/apr_xml.lo -c xml/apr_xml.c && touch xml/apr_xml.lo
    xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory
    compilation terminated.
    /home/nexteon/installSw/tar.gz/httpd-2.4.34/srclib/apr-util/build/rules.mk:206: recipe for target 'xml/apr_xml.lo' failed
    make[3]: * [xml/apr_xml.lo] Error 1
    make[3]: Leaving directory '/home/nexteon/installSw/tar.gz/httpd-2.4.34/srclib/apr-util'

    pcre installed successfully but getting error while installing httpd webserver.(1 – ./configure successful )(2- sudo make, getting above error)

    Please do needful !!

  • I am installing on rhel 7 and i have installed all the dependencies

  • While buildining apache httpd i am facing below issue can any one please help me on it:
    make[1]: Entering directory `/opt/httpd-2.4.33/support'
    make[2]: Entering directory `/opt/httpd-2.4.33/support'
    /opt/httpd-2.4.33/srclib/apr/build-1/libtool –silent –mode=compile gcc -std=gnu99 -g -O2 -pthread -DLINUX -D_REENTRANT -D_GNU_SOURCE -I. -I/opt/httpd-2.4.33/os/unix -I/opt/httpd-2.4.33/include -I/opt/httpd-2.4.33/srclib/apr/include/apr-1 -I/opt/httpd-2.4.33/srclib/apr_util/include/apr-1 -I/opt/pcre/include -I/opt/httpd-2.4.33/modules/aaa -I/opt/httpd-2.4.33/modules/cache -I/opt/httpd-2.4.33/modules/core -I/opt/httpd-2.4.33/modules/database -I/opt/httpd-2.4.33/modules/filters -I/opt/httpd-2.4.33/modules/ldap -I/opt/httpd-2.4.33/modules/loggers -I/opt/httpd-2.4.33/modules/lua -I/opt/httpd-2.4.33/modules/proxy -I/opt/httpd-2.4.33/modules/session -I/opt/httpd-2.4.33/modules/ssl -I/opt/httpd-2.4.33/modules/test -I/opt/httpd-2.4.33/server -I/opt/httpd-2.4.33/modules/md -I/opt/httpd-2.4.33/modules/arch/unix -I/opt/httpd-2.4.33/modules/dav/main -I/opt/httpd-2.4.33/modules/generators -I/opt/httpd-2.4.33/modules/mappers -prefer-non-pic -static -c htpasswd.c && touch htpasswd.lo
    /opt/httpd-2.4.33/srclib/apr/build-1/libtool –silent –mode=compile gcc -std=gnu99 -g -O2 -pthread -DLINUX -D_REENTRANT -D_GNU_SOURCE -I. -I/opt/httpd-2.4.33/os/unix -I/opt/httpd-2.4.33/include -I/opt/httpd-2.4.33/srclib/apr/include/apr-1 -I/opt/httpd-2.4.33/srclib/apr_util/include/apr-1 -I/opt/pcre/include -I/opt/httpd-2.4.33/modules/aaa -I/opt/httpd-2.4.33/modules/cache -I/opt/httpd-2.4.33/modules/core -I/opt/httpd-2.4.33/modules/database -I/opt/httpd-2.4.33/modules/filters -I/opt/httpd-2.4.33/modules/ldap -I/opt/httpd-2.4.33/modules/loggers -I/opt/httpd-2.4.33/modules/lua -I/opt/httpd-2.4.33/modules/proxy -I/opt/httpd-2.4.33/modules/session -I/opt/httpd-2.4.33/modules/ssl -I/opt/httpd-2.4.33/modules/test -I/opt/httpd-2.4.33/server -I/opt/httpd-2.4.33/modules/md -I/opt/httpd-2.4.33/modules/arch/unix -I/opt/httpd-2.4.33/modules/dav/main -I/opt/httpd-2.4.33/modules/generators -I/opt/httpd-2.4.33/modules/mappers -prefer-non-pic -static -c passwd_common.c && touch passwd_common.lo
    /opt/httpd-2.4.33/srclib/apr/build-1/libtool –silent –mode=link gcc -std=gnu99 -g -O2 -pthread -o htpasswd htpasswd.lo passwd_common.lo /opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.la /opt/httpd-2.4.33/srclib/apr/lib/libapr-1.la -lrt -lcrypt -lpthread -ldl -lcrypt
    /opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.so: undefined reference to `XML_GetErrorCode'
    /opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.so: undefined reference to `XML_SetEntityDeclHandler'
    /opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.so: undefined reference to `XML_ParserCreate'
    /opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.so: undefined reference to `XML_SetCharacterDataHandler'
    /opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.so: undefined reference to `XML_ParserFree'
    /opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.so: undefined reference to `XML_SetUserData'
    /opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.so: undefined reference to `XML_StopParser'
    /opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.so: undefined reference to `XML_Parse'
    /opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.so: undefined reference to `XML_ErrorString'
    /opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.so: undefined reference to `XML_SetElementHandler'
    collect2: error: ld returned 1 exit status
    make[2]: * [htpasswd] Error 1
    make[2]: Leaving directory `/opt/httpd-2.4.33/support'
    make[1]: * [all-recursive] Error 1
    make[1]: Leaving directory `/opt/httpd-2.4.33/support'
    make: * [all-recursive] Error 1

  • Hi!
    Thanks for the manual. Please, tell me, what the comand to manage the application after manual installation? (for example apache2 start/stop/restart)

  • I am getting this error after ./configure –prefix=/opt/apache2/ –with-pcre=/usr/local/pcre/ this command
    can you help me out

    [root@localhost httpd-2.4.25]# make
    make: * No targets specified and no makefile found. Stop.

  • Can you please upload video to demonstrate how to configure apache httpd server with any of the AS (tomcat/jboss) ?

Comments are closed.