CMDCommand · run as root on the server · modsec family
urbestack-modsec-set
First published 19 Nov 2026
0.2.30Unchanged since publicationUsage
# urbestack-modsec-set [--mode off|logging|blocking] [--managed true|false]Description
From the command's --help outputSets the server's ModSecurity mode, changes who manages ModSecurity, or does both. Give --mode, --managed or both. The default mode is off, which disables inspection for domains that follow the server's mode. The logging mode logs requests that would be refused. The blocking mode can refuse them. Use --managed true to have UrbeStack manage ModSecurity or --managed false to manage it yourself. The values 1, yes and on also mean true. The values 0, no and off also mean false. While you manage ModSecurity yourself, UrbeStack saves the mode for when it takes over. Taking over queues installation if the module is missing. Changes to Apache take effect immediately. UrbeStack rewrites its part of the configuration, tests it and reloads Apache. When UrbeStack manages ModSecurity, it includes OWASP CRS if the server or any domain uses logging or blocking, unless another rule set uses the same rule numbers. If Apache rejects the configuration, UrbeStack restores the previous configuration, discards the rejected change and returns Apache's error. The command returns the same status information as urbestack-modsec-status.Usage: urbestack-modsec-set [--mode off|logging|blocking] [--managed true|false] Sets the server's ModSecurity mode, changes who manages ModSecurity, or does both. Give --mode, --managed or both. The default mode is off, which disables inspection for domains that follow the server's mode. The logging mode logs requests that would be refused. The blocking mode can refuse them. Use --managed true to have UrbeStack manage ModSecurity or --managed false to manage it yourself. The values 1, yes and on also mean true. The values 0, no and off also mean false. While you manage ModSecurity yourself, UrbeStack saves the mode for when it takes over. Taking over queues installation if the module is missing. Changes to Apache take effect immediately. UrbeStack rewrites its part of the configuration, tests it and reloads Apache. When UrbeStack manages ModSecurity, it includes OWASP CRS if the server or any domain uses logging or blocking, unless another rule set uses the same rule numbers. If Apache rejects the configuration, UrbeStack restores the previous configuration, discards the rejected change and returns Apache's error. The command returns the same status information as urbestack-modsec-status.
Options
Find other commands that accept these optionsSame in the API
This operation runs the command.Generated from release 0.2.35 (current) · urbestack-modsec-set --help outputThis entry has been unchanged since it was first published in release 0.2.30 on 19 Nov 2026.
urbestack.com/docs/commands/urbestack-modsec-set/