We can install mod_qos package inside our Docker container.
Then we can verify the module is installed for mod_qos inside /..../modules/ directory.
If it's installed correctly then we can add mod_qos.conf file inside /..../conf.d/mod_qos.conf file with following configuration
## QoS Settings
<IfModule mod_qos.c>
# handles connections from up to 100000 different IPs
#QS_ClientEntries 100000
# will allow only 10 connections per IP
QS_SrvMaxConnPerIP 30
# maximum number of active TCP connections is limited to 256
MaxClients 256
# disables keep-alive when 70% of the TCP connections are occupied:
QS_SrvMaxConnClose 180
# minimum request/response speed (deny slow clients blocking the server i.e. slowloris keeping connections open without requesting anything
QS_SrvMinDataRate 150 1200
# and limit request header and body (carefull, that limits uploads and post requests too):
LimitRequestFields 30
QS_LimitRequestBody 102400
</IfModule>