Enable different Apache modules

LDAP

Bitnami stacks already ship the LDAP module installed in Apache but it is not enabled by default. To enable this module, follow these steps:

Enable the LDAP module. Edit the main Apache configuration file located at /opt/bitnami/apache2/conf/httpd.conf. Uncomment the mod_authnz_ldap line and add the mod_ldap line at the end of the LoadModule section:

$ sudo sed 's@Include "/opt/bitnami/apache2/conf/bitnami/bitnami.conf"@Include "/opt/bitnami/apache2/conf/bitnami/bitnami.conf"\nInclude "/opt/bitnami/apache2/conf/modevasion.conf"@' -i /opt/bitnami/apache2/conf/httpd.conf
$ sudo tee /opt/bitnami/apache2/conf/modevasion.conf <<EOF
#increases size of hash table. Good, but uses more RAM."
DOSHashTableSize 3097"
#Interval, in seconds, of the page interval."
DOSPageInterval 1"
#Interval, in seconds, of the site interval."
DOSSiteInterval 1"
#period, in seconds, a client is blocked. The counter is reset to 0 with every access within this interval."
DOSBlockingPeriod 10"
#threshold of requests per page, per page interval. If hit == block."
DOSPageCount 2"
#threshold of requests for any object by the same ip, on the same listener, per site interval."
DOSSiteCount 50"
#locking mechanism prevents repeated calls. email can be sent when host is blocked (leverages the following by default "/bin/mail -t %s")"
DOSEmailNotify mbrown@domainy.com"
#locking mechanism prevents repeated calls. A command can be executed when a host is blocked. %s is the host IP."
#DOSSystemCommand \"su - someuser -c \'/sbin/... %s ...\'\""
#DOSLogDir \"/var/lock/mod_evasive\""
#whitelist an IP., leverage wildcards, not CIDR, like 127.0.0.*"
#DOSWhiteList 127.0.0.1"
EOF

mod_security

Bitnami stacks already ship the mod_security2 module installed in Apache but it is not enabled by default. To enable this module, follow these steps:

Enable the mod_security2 and mod_unique_id modules in Apache. Edit the main Apache configuration file and uncomment the unique_id_module and add the mod_security line at the end of the LoadModule section:

If everything goes well, the module will be installed to /opt/bitnami/apache2/modules/mod_xsendfile.so. Check the mod_xsenfile configuration page to find out how to configure this module for your application.

mod_http2

Bitnami stacks ship with the mod_http2 module installed, but it is not enabled by default. To enable this module, follow these steps:

Edit the main Apache configuration file at /opt/bitnami/apache2/conf/httpd.conf and uncomment the line below so that it looks like this: