Managing your web contexts with the CLI

You can use the CLI to manage your web contexts. For example, the enable-context command can be used to tell Apache that a particular web context is able to receive requests, as follows:

[standalone@localhost:9990 subsystem=modcluster] :enable-context(context=/app, virtualhost=default-host)
{"outcome" => "success"}

The corresponding disable-context command can be used to prevent Apache from sending new requests:

[standalone@localhost:9990 subsystem=modcluster] :disable-context(context=/app, virtualhost=default-host)
{"outcome" => "success"}

To stop Apache from sending requests from a web context, you can use the stop-context command, as follows:

[standalone@localhost:9990 subsystem=modcluster] :stop-context(context=/app, ...

Get WildFly Configuration, Deployment, and Administration - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.