You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-6Lines changed: 12 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,12 @@ sudo ols site create example.com --wp
48
48
sudo ols site update example.com --php85
49
49
```
50
50
51
+
### Enable OWASP + reCAPTCHA and add security headers on a site
52
+
53
+
```bash
54
+
sudo ols site update example.com --enable-owasp --enable-recaptcha --hsts
55
+
```
56
+
51
57
### Show site information
52
58
53
59
```bash
@@ -69,8 +75,8 @@ ols site list
69
75
### Preview operations without making changes
70
76
71
77
```bash
72
-
ols --dry-run site create example.com --wp --le --php85
73
-
ols --dry-run site update example.com --wp --php83
78
+
ols --dry-run site create example.com --wp --le --php85 --enable-owasp --hsts
79
+
ols --dry-run site update example.com --enable-recaptcha --disable-owasp
74
80
ols --dry-run site info example.com
75
81
ols --dry-run site show example.com
76
82
ols --dry-run site list
@@ -81,8 +87,8 @@ ols --dry-run site list
81
87
| Command | Purpose | Common options |
82
88
| --- | --- | --- |
83
89
|`ols install`| Install/align OpenLiteSpeed runtime and related packages |`--php81``--php82``--php83``--php84``--php85``--database``--config``--http-port``--https-port``--ssl-cert``--ssl-key``--no-listeners`|
84
-
|`ols site create <domain>`| Create a new site/vhost |`--wp``--le``--php81``--php82``--php83``--php84``--php85`|
85
-
|`ols site update <domain>`| Update an existing site (PHP target is required) |`--wp``--php81``--php82``--php83``--php84``--php85`|
90
+
|`ols site create <domain>`| Create a new site/vhost |`--wp``--le``--php81``--php82``--php83``--php84``--php85``--enable-owasp``--disable-owasp``--enable-recaptcha``--disable-recaptcha``--hsts`|
91
+
|`ols site update <domain>`| Update an existing site (PHP target optional when only security flags are used) |`--wp``--php81``--php82``--php83``--php84``--php85``--enable-owasp``--disable-owasp``--enable-recaptcha``--disable-recaptcha``--hsts`|
86
92
|`ols site info <domain>`| Show site metadata and detected status |*(none)*|
87
93
|`ols site show <domain>`| Print OLS virtual host config (`vhconf.conf`) |*(none)*|
88
94
|`ols site list`| List managed sites discovered from OLS vhost directory |*(none)*|
@@ -95,8 +101,8 @@ Global options (apply to all commands): `--dry-run`, `--color`
95
101
96
102
| Subcommand | Syntax | Options |
97
103
| --- | --- | --- |
98
-
|`create`|`ols site create <domain>`|`--wp``--le``--php81``--php82``--php83``--php84``--php85`|
99
-
|`update`|`ols site update <domain>`|`--wp`and exactly one of `--php81``--php82``--php83``--php84``--php85`|
104
+
|`create`|`ols site create <domain>`|`--wp``--le``--php81``--php82``--php83``--php84``--php85``--enable-owasp``--disable-owasp``--enable-recaptcha``--disable-recaptcha``--hsts`|
105
+
|`update`|`ols site update <domain>`|`--wp`(requires one of `--php81``--php82``--php83``--php84``--php85`), or security flags only: `--enable-owasp``--disable-owasp``--enable-recaptcha``--disable-recaptcha``--hsts`|
returnnil, apperr.New(apperr.CodeValidation, fmt.Sprintf("conflicting flags for %s; choose only one of --enable-%s/--disable-%s", feature, feature, feature))
returnapperr.New(apperr.CodeValidation, "no update action provided; pass PHP version and/or security flags such as --enable-owasp, --enable-recaptcha, --disable-owasp, --disable-recaptcha, --hsts")
0 commit comments