Skip to content

Commit 7a90fb8

Browse files
committed
Merge remote-tracking branch 'origin' into epic-472-port-nginx-one-labs
2 parents c3046e1 + 1079afc commit 7a90fb8

File tree

5 files changed

+60
-68
lines changed

5 files changed

+60
-68
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
docs:
3+
files:
4+
- content/nginx-one/workshops/lab5/upgrade-nginx-plus-to-latest-version.md
5+
- content/includes/use-cases/monitoring/enable-nginx-plus-api.md
6+
---
7+
8+
```nginx
9+
# This block enables the NGINX Plus API and dashboard
10+
# For configuration and security recommendations, see:
11+
# https://docs.nginx.com/nginx/admin-guide/monitoring/live-activity-monitoring/#configuring-the-api
12+
server {
13+
# Change the listen port if 9000 conflicts
14+
# (8080 is the conventional API port)
15+
listen 9000;
16+
17+
location /api/ {
18+
# To restrict write methods (POST, PATCH, DELETE), uncomment:
19+
# limit_except GET {
20+
# auth_basic "NGINX Plus API";
21+
# auth_basic_user_file /path/to/passwd/file;
22+
# }
23+
24+
# Enable API in write mode
25+
api write=on;
26+
27+
# To restrict access by network, uncomment and set your network:
28+
# allow 192.0.2.0/24 # replace with your network
29+
# deny all;
30+
}
31+
32+
# Serve the built-in dashboard at /dashboard.html
33+
location = /dashboard.html {
34+
root /usr/share/nginx/html;
35+
}
36+
}
37+
```

content/includes/use-cases/monitoring/enable-nginx-plus-api.md

Lines changed: 8 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -4,61 +4,15 @@ files:
44
- content/nim/monitoring/overview-metrics.md
55
- content/nginx-one/getting-started.md
66
---
7-
<!-- include in content/nginx-one/getting-started.md disabled, hopefully temporarily -->
8-
To collect comprehensive metrics for NGINX Plus -- including bytes streamed, information about upstream systems and caches, and counts of all HTTP status codes -- add the following to your NGINX Plus configuration file (for example, `/etc/nginx/nginx.conf` or an included file):
97

10-
```nginx
11-
# This block:
12-
# - Enables the read-write NGINX Plus API under /api/
13-
# - Serves the built-in dashboard at /dashboard.html
14-
# - Restricts write methods (POST, PATCH, DELETE) to authenticated users
15-
# and a specified IP range
16-
# Change the listen port if 9000 conflicts; 8080 is the conventional API port.
17-
server {
18-
# Listen on port 9000 for API and dashboard traffic
19-
listen 9000 default_server;
8+
To collect comprehensive metrics for NGINX Plus, including bytes streamed, information about upstream systems and caches, and counts of all HTTP status codes, add the following to your NGINX Plus configuration file, for example `/etc/nginx/nginx.conf` or an included file:
209

21-
# Handle API calls under /api/
22-
location /api/ {
23-
# Enable write operations (POST, PATCH, DELETE)
24-
api write=on;
10+
{{< include "config-snippets/enable-nplus-api-dashboard.md" >}}
2511

26-
# Allow GET requests from any IP
27-
allow 0.0.0.0/0;
28-
# Deny all other requests by default
29-
deny all;
12+
{{< call-out "note" "Security tip" >}}
13+
- By default, all clients can call the API.
14+
- To limit who can access the API, uncomment the `allow` and `deny` lines under `api write=on` and replace the example CIDR with your trusted network.
15+
- To restrict write methods (`POST`, `PATCH`, `DELETE`), uncomment and configure the `limit_except GET` block and set up [HTTP basic authentication](https://nginx.org/en/docs/http/ngx_http_auth_basic_module.html).
16+
{{</ call-out >}}
3017

31-
# For methods other than GET, require auth and restrict to a network
32-
limit_except GET {
33-
# Prompt for credentials with this realm
34-
auth_basic "NGINX Plus API";
35-
# Path to the file with usernames and passwords
36-
auth_basic_user_file /path/to/passwd/file;
37-
38-
# Allow only this IP range (replace with your own)
39-
allow 192.0.2.0/24;
40-
# Deny all other IPs
41-
deny all;
42-
}
43-
}
44-
45-
# Serve the dashboard page at /dashboard.html
46-
location = /dashboard.html {
47-
# Files are located under this directory
48-
root /usr/share/nginx/html;
49-
}
50-
51-
# Redirect any request for / to the dashboard
52-
location / {
53-
return 301 /dashboard.html;
54-
}
55-
}
56-
```
57-
58-
For more details, see the [NGINX Plus API module documentation](https://nginx.org/en/docs/http/ngx_http_api_module.html) and [Configuring the NGINX Plus API]({{< ref "nginx/admin-guide/monitoring/live-activity-monitoring.md#configuring-the-api" >}}).
59-
60-
After saving the changes, reload NGINX:
61-
62-
```shell
63-
nginx -s reload
64-
```
18+
For more details, see the [NGINX Plus API module](https://nginx.org/en/docs/http/ngx_http_api_module.html) documentation and [Configuring the NGINX Plus API]({{< ref "/nginx/admin-guide/monitoring/live-activity-monitoring.md#configuring-the-api" >}}).

content/nginx-one/_index.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
---
22
title: F5 NGINX One Console
3-
description: The F5 NGINX One Console makes it easy to manage NGINX instances across locations and environments. The console lets you monitor and control your NGINX fleet from one place—you can check configurations, track performance metrics, identify security vulnerabilities, manage SSL certificates, and more.
3+
nd-subtitle: The F5 NGINX One Console makes it easy to manage NGINX instances across locations and environments. The console lets you monitor and control your NGINX fleet from one place—you can check configurations, track performance metrics, identify security vulnerabilities, manage SSL certificates, and more.
44
url: /nginx-one/
5-
hasCustomContent: true
5+
nd-landing-page: true
66
cascade:
77
logo: "NGINX-One-product-icon.svg"
8+
nd-content-type: landing-page
9+
nd-product: NGINX One
810
---
911
{{< card-layout >}}
1012
{{< card-section >}}
@@ -35,38 +37,37 @@ cascade:
3537
{{< card title="Glossary" >}}
3638
Learn terms unique to NGINX One Console
3739
{{</ card >}}
38-
{{< card title="Changelog" >}}
39-
{{< changelog-dates >}}
40+
{{< card title="Changelog" >}}{{< changelog-dates >}}
4041
{{</ card >}}
4142
{{</ card-section >}}
4243

4344
# Other Components
4445
{{< card-section title="Kubernetes Solutions">}}
45-
{{< card title="NGINX Ingress Controller" titleUrl="/nginx-ingress-controller/" icon="NGINX-Ingress-Controller-product-icon">}}
46+
{{< card title="NGINX Ingress Controller" titleUrl="/nginx-ingress-controller/" brandIcon="NGINX-Ingress-Controller-product-icon">}}
4647
Kubernetes traffic management with API gateway, identity, and observability features.
4748
{{</ card >}}
48-
{{< card title="NGINX Gateway Fabric" titleUrl="/nginx-gateway-fabric" icon="NGINX-product-icon">}}
49+
{{< card title="NGINX Gateway Fabric" titleUrl="/nginx-gateway-fabric" brandIcon="NGINX-product-icon">}}
4950
Next generation Kubernetes connectivity using the Gateway API.
5051
{{</ card >}}
5152
{{</ card-section >}}
5253
{{< card-section title="Local Console Option">}}
53-
{{< card title="NGINX Instance Manager" titleUrl="/nginx-instance-manager" icon="NGINX-Instance-Manager-product-icon">}}
54+
{{< card title="NGINX Instance Manager" titleUrl="/nginx-instance-manager" brandIcon="NGINX-Instance-Manager-product-icon">}}
5455
Track and control NGINX Open Source and NGINX Plus instances.
5556
{{</ card >}}
5657
{{</ card-section >}}
5758
{{< card-section title="Modern App Delivery">}}
58-
{{< card title="NGINX Plus" titleUrl="/nginx" icon="NGINX-Plus-product-icon-RGB">}}
59+
{{< card title="NGINX Plus" titleUrl="/nginx" brandIcon="NGINX-Plus-product-icon-RGB">}}
5960
The all-in-one load balancer, reverse proxy, web server, content cache, and API gateway.
6061
{{</ card >}}
61-
{{< card title="NGINX Open Source" titleUrl="https://nginx.org" icon="NGINX-product-icon">}}
62+
{{< card title="NGINX Open Source" titleUrl="https://nginx.org" brandIcon="NGINX-product-icon">}}
6263
The open source all-in-one load balancer, content cache, and web server
6364
{{</ card >}}
6465
{{</ card-section >}}
6566
{{< card-section title="Security">}}
66-
{{< card title="NGINX App Protect WAF" titleUrl="/nginx-app-protect-waf" icon="NGINX-App-Protect-WAF-product-icon">}}
67+
{{< card title="NGINX App Protect WAF" titleUrl="/nginx-app-protect-waf" brandIcon="NGINX-App-Protect-WAF-product-icon">}}
6768
Lightweight, high-performance, advanced protection against Layer 7 attacks on your apps and APIs.
6869
{{</ card >}}
69-
{{< card title="NGINX App Protect DoS" titleUrl="/nginx-app-protect-dos" icon="NGINX-App-Protect-DoS-product-icon">}}
70+
{{< card title="NGINX App Protect DoS" titleUrl="/nginx-app-protect-dos" brandIcon="NGINX-App-Protect-DoS-product-icon">}}
7071
Defend, adapt, and mitigate against Layer 7 denial-of-service attacks on your apps and APIs.
7172
{{</ card >}}
7273
{{</ card-section >}}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ module github.com/nginxinc/docs
22

33
go 1.19
44

5-
require github.com/nginxinc/nginx-hugo-theme v0.42.37 // indirect
5+
require github.com/nginxinc/nginx-hugo-theme v0.43.2 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github.com/nginxinc/nginx-hugo-theme v0.42.37 h1:KtESjG1VG6ioSQBWfwgIiDVEmq9mylpunV2NENM8XvI=
2-
github.com/nginxinc/nginx-hugo-theme v0.42.37/go.mod h1:DPNgSS5QYxkjH/BfH4uPDiTfODqWJ50NKZdorguom8M=
1+
github.com/nginxinc/nginx-hugo-theme v0.43.2 h1:g+5+egVI1OOsXRcDSQvWeRhihZfc7LDTnWceZWS7J/o=
2+
github.com/nginxinc/nginx-hugo-theme v0.43.2/go.mod h1:DPNgSS5QYxkjH/BfH4uPDiTfODqWJ50NKZdorguom8M=

0 commit comments

Comments
 (0)