NGinx server with ModSecurity support.
957
NGinx server with ModSecurity support, running in Docker.
# mysite.conf
server {
listen 80;
listen [::]:80;
server_name mysite.local;
modsecurity on;
location / {
root /var/www/html;
modsecurity_rules_file /etc/nginx/myrules.conf;
}
}
# rules.conf
SecRule REQUEST_METHOD "@streq PUT" \
[...]
/etc/nginx/conf.d, and the ModSecurity rules to /etc/nginx/myrules.conf (or whatever you specified in the NGinx config file).docker run -p 80:80 \
-v mysite.conf:/etc/nginx/conf.d/mysite.conf \
-v rules.conf:/etc/nginx/myrules.conf \
xtrasimplicity/nginx-modsecurity
---
version: '3.5'
services:
proxy:
image: xtrasimplicity/nginx-modsecurity
volumes:
- mysite.conf:/etc/nginx/conf.d/mysite.conf
- rules.conf:/etc/nginx/myrules.conf
ports:
- 80:80
Content type
Image
Digest
Size
90.8 MB
Last updated
almost 7 years ago
docker pull xtrasimplicity/nginx-modsecurity