File tree 3 files changed +23
-0
lines changed
3 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ $ docker run \
17
17
--rm \
18
18
--name nginx-basic-auth-proxy \
19
19
-p 8080:80 \
20
+ -p 8090:8090 \
20
21
-e BASIC_AUTH_USERNAME=username \
21
22
-e BASIC_AUTH_PASSWORD=password \
22
23
-e PROXY_PASS=https://www.google.com \
@@ -37,6 +38,18 @@ $ docker-compose up
37
38
# - Password: password
38
39
```
39
40
41
+ ### Endpoint for monitoring
42
+
43
+ ` :8090/nginx_status ` returns the metrics of Nginx.
44
+
45
+ ``` sh-session
46
+ $ curl localhost:8090/nginx_status
47
+ Active connections: 1
48
+ server accepts handled requests
49
+ 8 8 8
50
+ Reading: 0 Writing: 1 Waiting: 0
51
+ ```
52
+
40
53
## Environment variables
41
54
42
55
### Required
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ services:
6
6
image : quay.io/dtan4/nginx-basic-auth-proxy:latest
7
7
ports :
8
8
- 8080:80
9
+ - 8090:8090
9
10
environment :
10
11
- BASIC_AUTH_USERNAME=username
11
12
- BASIC_AUTH_PASSWORD=password
Original file line number Diff line number Diff line change @@ -30,4 +30,13 @@ http {
30
30
proxy_set_header Authorization "";
31
31
}
32
32
}
33
+
34
+ server {
35
+ listen 8090;
36
+
37
+ location /nginx_status {
38
+ stub_status on;
39
+ access_log off;
40
+ }
41
+ }
33
42
}
You can’t perform that action at this time.
0 commit comments