File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 34
34
# Can disable this (default) and add the modsec directives in each ___location block
35
35
if [ " ${MODSEC_ENABLE} " == " 1" ] || [ " ${MODSEC_ENABLE} " -eq 1 ]; then
36
36
log " Enabling modsecurity in server block of port 80 and 443"
37
- sed-patch " s|#<MODSEC_ON>|modsecurity on;|g" /etc/nginx/conf.d/default .conf
38
- sed-patch " s|#<MODSEC_RULES>|modsecurity_rules_file /etc/nginx/modsec/main.conf;|g" /etc/nginx/conf.d/default .conf
37
+ sed -i " s|#<MODSEC_ON>|modsecurity on;|g" /etc/nginx/nginx .conf
38
+ sed -i " s|#<MODSEC_RULES>|modsecurity_rules_file /etc/nginx/modsec/main.conf;|g" /etc/nginx/nginx .conf
39
39
fi
40
40
# Enabled modsecurity in the server block of :81 (admin dashboard)
41
41
if [ " ${MODSEC_ADMIN_PANEL} " == " 1" ] || [ " ${MODSEC_ADMIN_PANEL} " -eq 1 ]; then
42
42
log " Enabling modsecurity in server block of admin dashboard port 81"
43
- sed-patch " s|#<MODSEC_ON>|modsecurity on;|g" /etc/nginx/conf.d/production.conf
44
- sed-patch " s|#<MODSEC_RULES>|modsecurity_rules_file /etc/nginx/modsec/main.conf;|g" /etc/nginx/conf.d/production.conf
43
+ sed -i " s|#<MODSEC_ON>|modsecurity on;|g" /etc/nginx/conf.d/production.conf
44
+ sed -i " s|#<MODSEC_RULES>|modsecurity_rules_file /etc/nginx/modsec/main.conf;|g" /etc/nginx/conf.d/production.conf
45
45
46
46
fi
Original file line number Diff line number Diff line change 56
56
map $host $forward_scheme {
57
57
default http;
58
58
}
59
+ #<MODSEC_ON>
60
+ #<MODSEC_RULES>
59
61
60
62
# Real IP Determination
61
63
You can’t perform that action at this time.
0 commit comments