# urbestack-modsec-status

First published 19 Nov 2026 (release 0.2.30) · Unchanged since publication

UrbeStack release 0.2.35 command, run as root in the server shell.

## Usage

```
urbestack-modsec-status [--decide]
```

## Description

Reports whether UrbeStack manages ModSecurity, the configured server mode, and whether the module is installed and loaded by Apache. It shows the module's package and installed version, the versions of the bundled OWASP CRS and WordPress exclusions, whether OWASP CRS is included, and the request body limits.

It lists UrbeStack's configuration file, your own configuration file, the package's configuration file and the module loader. It reports whether the package's settings are active and identifies the file and line of the SecRuleEngine directive in your own file that sets the engine for domains that follow the server's mode. It also reports domain and rule counts and, if the server mode has been set, who last set it and when.

The state is not_managed when UrbeStack leaves ModSecurity under the administrator's control, missing when UrbeStack manages it and the module is absent, or not_loaded when Apache leaves the installed module unloaded. The conflict state identifies a file with overlapping rule numbers that keeps UrbeStack from including OWASP CRS. The by_hand state means your own configuration sets SecRuleEngine. The managed state means UrbeStack's configuration applies.

Use --decide during setup to choose who manages ModSecurity if the server has no decision yet. If a decision is already set, --decide leaves the server unchanged. An installed module stays under the administrator's control. If the module is absent, UrbeStack takes over and installation is due through urbestack-modsec-install. The result reports whether a decision was made on this run and whether installation is due.

## Same in the API

- [GET /security/modsec](https://urbestack.com/docs/api/get-security-modsec.md): Get the server's ModSecurity status

## Command family: modsec

- [urbestack-modsec-disabled-rule-add](https://urbestack.com/docs/commands/urbestack-modsec-disabled-rule-add.md): Turns off ModSecurity detection rules for one domain or for the whole server.
- [urbestack-modsec-disabled-rule-del](https://urbestack.com/docs/commands/urbestack-modsec-disabled-rule-del.md): Removes the setting that turns off a ModSecurity rule for one domain or for the whole server.
- [urbestack-modsec-disabled-rules](https://urbestack.com/docs/commands/urbestack-modsec-disabled-rules.md): Lists the ModSecurity rule set's detection rules that are turned off.
- [urbestack-modsec-domains](https://urbestack.com/docs/commands/urbestack-modsec-domains.md): Lists domains with their effective ModSecurity mode, the mode set for each domain and who set it and when, and its owner's choice.
- [urbestack-modsec-install](https://urbestack.com/docs/commands/urbestack-modsec-install.md): Installs the distribution's ModSecurity package.
- [urbestack-modsec-requests](https://urbestack.com/docs/commands/urbestack-modsec-requests.md): Lists requests ModSecurity blocked or would have blocked in logging mode, newest first.
- [urbestack-modsec-rule-add](https://urbestack.com/docs/commands/urbestack-modsec-rule-add.md): Adds a server-wide custom ModSecurity rule from standard input.
- [urbestack-modsec-rule-del](https://urbestack.com/docs/commands/urbestack-modsec-rule-del.md): Deletes a custom ModSecurity rule.
- [urbestack-modsec-rule-set](https://urbestack.com/docs/commands/urbestack-modsec-rule-set.md): Changes the custom ModSecurity rule selected by --rule.
- [urbestack-modsec-rules](https://urbestack.com/docs/commands/urbestack-modsec-rules.md): Lists the custom ModSecurity rules shown in the ModSecurity section of the web interface, in rule number order.
- [urbestack-modsec-set](https://urbestack.com/docs/commands/urbestack-modsec-set.md): Sets the server's ModSecurity mode, changes who manages ModSecurity, or does both.
- [urbestack-modsec-sort](https://urbestack.com/docs/commands/urbestack-modsec-sort.md): Sorts ModSecurity audit records into domain logs.
