A custom Nginx proxy pass image for the typical web application
428
An alpine based Nginx image powered by various security related optimisations
services:
nginx:
image: zar3bski/nginx_cerberus
volumes:
- ./site.conf:/etc/nginx/conf.d/site.conf
ports:
- 80:80
- 443:443
environment:
- [email protected]
| name | required | default | description |
|---|---|---|---|
ADMIN_EMAIL | True | None | expiration email so Let's Encrypt could notify the administrator (required only if AUTO_HTTPS == True) |
AUTO_HTTPS | False | True | generate ssl certificates for all domaines found in /etc/nginx/conf.d and migrate to HTTPS |
LOG_STDOUT | False | True | whether or not default logs should be appended to stdout rather than files |
Here is how to activate Modsecurity for a website.
server {
# ...
modsecurity on;
modsecurity_rules_file /etc/nginx/modsec/mod_sec_main.conf;
}
mod_sec_main.conf includes all OWASP core rules stored in /etc/nginx/modsec/owasp_rules. You could either point to /etc/nginx/modsec/crs-setup.conf or to some custom.conf (provided that it includes modsecurity.conf). For instance:
Include "/etc/nginx/modsec/modsecurity.conf"
SecRule ARGS:testparam "@contains test" "id:1234,deny,status:403"
Content type
Image
Digest
Size
99.2 MB
Last updated
over 6 years ago
docker pull zar3bski/nginx_cerberus:amd64-0.3.0