Skip to content

Commit 6b9ea5a

Browse files
committed
Add more steps: install built module and restart the server
1 parent 705002b commit 6b9ea5a

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

.github/security2.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
LoadModule security2_module /usr/lib/apache2/modules/mod_security2.so
2+
3+
<IfModule security2_module>
4+
SecDataDir /var/cache/modsecurity
5+
Include /etc/apache2/modsecurity.conf
6+
</IfModule>

.github/workflows/ci.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Setup Dependencies
2121
run: |
2222
sudo apt-get update -y -qq
23-
sudo apt-get install -y apache2-dev libxml2-dev liblua5.1-0-dev libcurl4-gnutls-dev libpcre2-dev pkg-config libyajl-dev
23+
sudo apt-get install -y apache2-dev libxml2-dev liblua5.1-0-dev libcurl4-gnutls-dev libpcre2-dev pkg-config libyajl-dev apache2 apache2-bin apache2-data
2424
- uses: actions/checkout@v2
2525
- name: autogen.sh
2626
run: ./autogen.sh
@@ -29,3 +29,16 @@ jobs:
2929
- uses: ammaraskar/gcc-problem-matcher@master
3030
- name: make
3131
run: make -j `nproc`
32+
- name: install module
33+
run: sudo make install
34+
- name: prepare config
35+
run: |
36+
sudo cp .github/security2.conf /etc/apache2/mods-enabled/
37+
sudo cp modsecurity.conf-recommended /etc/apache2/modsecurity.conf
38+
sudo cp unicode.mapping /etc/apache2/
39+
sudo mkdir -p /var/cache/modsecurity
40+
sudo chown -R www-data:www-data /var/cache/modsecurity
41+
- name: start apache with module
42+
run: |
43+
sudo systemctl restart apache2.service
44+

0 commit comments

Comments
 (0)