Skip to content

Commit 2f27bf4

Browse files
committed
fix: edit nginx.conf
1 parent c75ec5f commit 2f27bf4

File tree

1 file changed

+32
-15
lines changed

1 file changed

+32
-15
lines changed

content/nap-waf/v5/admin-guide/policy-lifecycle-management.md

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -945,24 +945,41 @@ To verify that the policy bundles are being deployed and enforced correctly:
945945
deployment.apps/localenv-plm-nginx-app-protect-deployment 1/1 1 1 21h
946946
```
947947

948-
2. **Update NGINX Configuration via ConfigMap**
948+
2. **Update NGINX Configuration via values.yaml**
949949

950-
Edit the NGINX configuration through the ConfigMap:
950+
Open your `values.yaml` file with your preferred editor:
951951
```bash
952-
kubectl edit configmap nginx-config -n <namespace>
952+
nano values.yaml
953+
# or
954+
vi values.yaml
955+
# or any editor of your choice
953956
```
954957

955-
In the editor that opens:
956-
- Press `i` to enter insert mode
957-
- Find the active policy directive (e.g., `app_protect_policy_file app_protect_default_policy;`)
958-
- Comment it out by adding `#` at the beginning of the line
959-
- Find the line `# app_protect_policy_file custom_resource_name;`
960-
- Remove the `#` to uncomment it
961-
- Change `custom_resource_name` to `dataguard-blocking`
962-
- Press `Esc` to exit insert mode
963-
- Type `:wq` and press `Enter` to save and exit
964-
965-
3. **Restart the NGINX Deployment**
958+
Find the nginx configuration section and update the policy directive. Look for this line:
959+
```yaml
960+
app_protect_policy_file app_protect_default_policy;
961+
```
962+
963+
Change it to use your Custom Resource name:
964+
```yaml
965+
app_protect_policy_file dataguard-blocking;
966+
```
967+
968+
Save and close the file.
969+
970+
3. **Apply the Updated Configuration**
971+
972+
Run the Helm upgrade command to apply the new configuration (replace with your actual release name and namespace):
973+
```bash
974+
helm upgrade <release-name> . --namespace <namespace> --force
975+
```
976+
977+
Example:
978+
```bash
979+
helm upgrade localenv-plm . --namespace localenv-plm --force
980+
```
981+
982+
4. **Restart the NGINX Deployment**
966983

967984
Restart the deployment to apply the configuration changes (replace with your actual deployment name and namespace):
968985
```bash
@@ -974,7 +991,7 @@ To verify that the policy bundles are being deployed and enforced correctly:
974991
kubectl rollout restart deployment localenv-plm-nginx-app-protect-deployment -n localenv-plm
975992
```
976993

977-
4. **Test Policy Enforcement**
994+
5. **Test Policy Enforcement**
978995

979996
Send a request that should be blocked by the dataguard policy using the cluster IP you noted earlier:
980997
```bash

0 commit comments

Comments
 (0)