Is it possible to install Apache mod_security Amazon Elastic Beanstalk

I have 4 instances of ec2 (running Amazon Linux AMI) and i'am using an elastic beanstalk to deploy my Java application for Tomcat.

I would like to know if apache mod_security can be installed using .ebextensions?

ps: I know how to set mod_security and configure the line if I need to do this manually. Since I am not very familiar with ebextensions, I would like to know first, is this possible?

ps2: I would like to set mod_security to protect against a simple DOS attack Thank you!

0
source share
1 answer

, . .ebextensions 10_mod_security.config

packages:
  yum:
    mod_security: []

, , :

files:
  "/etc/httpd/conf.d/mod_security.conf":
    mode: "000644"
    owner: root
    group: root
    content: |
      insert your apache config here
    encoding: plain

yum, ( , yum , )

, .

+2

Source: https://habr.com/ru/post/1665694/


All Articles