Skip to content

viglu/docker-nginx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-nginx

How to use this docker image

Preparation of your system

apt update && apt install docker.io docker-compose

Install

Download docker-compose.yml and ModSecurity Core Rules Set (from https://coreruleset.org/)

git clone https://github.com/viglu/docker-nginx.git /opt/nginx

Build image

cd build
.\docker-build.bat
.\docker-save.bat

Deploy image

Take the tar create from docker-save.bat copy it to destination machine and load it with
docker load -i nginx-almalinux10.tar

Activate ModSecurity in nginx

Load ModSecurity module, define it at the top of your nginx.conf

load_module modules/ngx_http_modsecurity_module.so;

Activate ModSecurity

http {
  ...
  ...
  ...
  modsecurity on;
  modsecurity_rules_file /opt/nginx/conf/modsecurity.conf;
  
  server {
  ...
  ...
  ...

Download ModSecurity Core Rules Set

./updateCoreRuleSet.sh

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •