If you have not installed nginx with the build system, these commands will not work. To install nginx run this command:
sw build install nginx modsec-ruleset
list
sw nginx list sw nginx list disabled
List nginx sites along with system users.
add
sw nginx add sw nginx create sw nginx add example.com sw nginx add example.com unix_user
Create a new nginx vhost file and install it.
addssl
sw nginx addssl sw nginx addssl example.com
Adds the SSL section to an existing nginx configuration.
enable
sw nginx enable sw nginx enable example.com
Enables a vhost file that has been disabled.
disable
sw nginx disable sw nginx disable example.com
Disable an nginx vhost file
edit
sw nginx edit sw nginx edit example.com
Edit an nginx vhost and reload the nginx configuration upon exit.
retemplate
sw nginx retemplate sw nginx retemplate example.com
Reapply an nginx vhost template to a website’s vhost file. This is useful after a template is updated.
remove
sw nginx remove sw nginx remove example.com sw nginx delete sw nginx delete example.com
Delete an nginx vhost.
bypass
sw nginx bypass sw nginx bypass example.com sw nginx bypass example.com 0000
Set ModSecurity to ignore a ModSec rule for one domain.
unbypass
sw nginx unbypass sw nginx unbypass example.com sw nginx unbypass example.com 0000
Re-enable a bypassed ModSecurity rule for one domain.
listbypass
sw nginx listbypass sw nginx listbypass example.com
List the ModSecurity rules that are disabled for a domain.