Apache is the most widely used web server software. Developed and maintained by Apache Software Foundation, Apache is an open source software available for free. It is a webhosting industry standard and compatible with all website engines and CMSs. With event and worker MPMs, it benchmarks as well as Nginx in terms of concurrency (

You may get the basic information about your Apache installation with:

httpd -V

How to switch a webserver to apache

Use CustomBuild to switch to Apache and to define the needed PHP engine. The following example uses FastCGI as the PHP engine to build Apache and PHP:

cd /usr/local/directadmin/custombuild
./build update
./build set webserver apache
./build php1_mode fastcgi
./build php2_mode fastcgi
./build php3_mode fastcgi
./build php4_mode fastcgi
./build apache
./build php n
./build rewrite_confs

Valid choices for each of the options above in addition to the available PHP versions to be chosen from can be found like so:

cd /usr/local/directadmin/custombuild/
./build opt_help | grep "webserver\|mpm\|php._[mode|release]"

Which Apache MPM am I using?

Instead of implementing a single architecture, Apache provides a variety of MultiProcessing Modules (MPMs), which allow it to run in either a process-based mode, a hybrid (process and thread) mode, or an event-hybrid mode, in order to better match the demands of each particular infrastructure. Choice of MPM and configuration is therefore important.

To check what MPM is in use, you can ask the httpd binary:

httpd -V | grep 'MPM'

If you want to customize the MPM options, do it in the appropriate section of the /etc/httpd/conf/extra/httpd-mpm.conf file to customize it in a proper way.

How to ensure mod_rewrite is enabled

We get this question quite a bit, but not too sure why. It's always enabled in Apache by default. To confirm, type:

httpd -l | grep mod_rewrite

and you should see


in the output if it's enabled.

Gzip Compression via Mod_deflate

This is enabled by default. Global rules are defined in /etc/httpd/conf/extra/httpd-deflate.conf. Confirm this is enabled via the following command:

httpd -M | grep deflate

Expected output:

[root@host]# httpd -M | grep deflate
 deflate_module (static)


Since Mod_Cloudflare has been deprecated and Apache includes Mod_RemoteIP in Apache core, it is enabled by default and configured to work with Cloudflare automatically.

You can confirm it is enabled using this command:

httpd -M | grep remoteip

Expected output:

[root@host]# httpd -M | grep remoteip
 remoteip_module (static)

Rules for Cloudflare's IPs can be found in the file /etc/httpd/conf/extra/httpd-cloudflare.conf.

How to Check Apache Server Status

Apache server status can be accessed in your browser via http://Your-IP/server-status.

There it will ask you to authenticate using the credentials that were randomly generated in /etc/httpd/conf/extra/httpd-info.conf:

#Authenticate using:
#Username: randomly generated username
#Password: randomly generated password

If you don't see this, run

cd /usr/local/directadmin/custombuild
./build update
./build rewrite_confs

to generate new credentials.

Last Updated: