tar -xvf httpd-2.4.41.tar.gz
cd httpd-2.4.41

Compile and install:

./configure --prefix=/usr/local/apache24
make install

Copy the old configure files to new location, then load following modules to save troubles:

LoadModule unixd_module modules/
LoadModule access_compat_module modules/
LoadModule log_config_module modules/
LoadModule mime_module modules/
LoadModule socache_shmcb_module modules/
LoadModule setenvif_module modules/
LoadModule alias_module modules/
LoadModule slotmem_shm_module modules/


./bin/apachectl -t

Installation issues

“APR not found” issue

checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
configure: Configuring Apache Portable Runtime library...
checking for APR... no
configure: error: APR not found.  Please read the documentation.


sudo apt-get install libapr1-dev libaprutil1-dev

pcre-config issue

checking for pcre-config... false
configure: error: pcre-config for libpcre not found. PCRE is required and available from


sudo apt-get install libpcre3-dev

Upgrading issues

Common issues while upgrading Apache from 2.2 to 2.4 are summarized at:

Mutex issue

AH00548: NameVirtualHost has no effect and will be removed in the next release /usr/local/apache24/conf/extra/httpd-vhosts.conf:20 AH00526: Syntax error on line 72 of /usr/local/apache24/conf/extra/httpd-ssl.conf: Invalid Mutex directory in argument file:/usr/local/apache24/logs/ssl_mutex

Solution: replace SSLMutex with Mutex default 1.

Options issue

AH00526: Syntax error on line 37 of /usr/local/httpd/conf/extra/httpd-vhosts.conf: Either all Options must start with + or -, or no Option may.

Solution: mark the option with + like Options -Indexes +FollowSymLinks 2.

DefaultType issue

AH00117: Ignoring deprecated use of DefaultType in line 59 of /etc/httpd/conf/httpd.conf.

Solution: comment “DefaultType text/plain” 3.

Invalid command ‘UserDir’


LoadModule userdir_module modules/


Cannot load authn_default_module/authz_default_module

According to the official documentation, these modules have been removed in 2.4: mod_authn_default, mod_authz_default, mod_mem_cache.

invalid command ‘Order’


LoadModule access_compat_module modules/