Skip to content

Commit a353c5f

Browse files
committed
feat: OS version consolidation, remove redundancy
1 parent adbface commit a353c5f

File tree

15 files changed

+278
-1112
lines changed

15 files changed

+278
-1112
lines changed
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
1. Upload **nginx-repo.key** to **/etc/apk/cert.key** and **nginx-repo.crt** to **/etc/apk/cert.pem**. Make sure that files do not contain other certificates and keys: Alpine Linux does not support mixing client certificates for different repositories.
1+
Move **nginx-repo.key** to **/etc/apk/cert.key** and **nginx-repo.crt** to **/etc/apk/cert.pem**. Make sure that files do not contain other certificates and keys: Alpine Linux does not support mixing client certificates for different repositories.
22

3-
2. Install prerequisite packages:
3+
Install prerequisite packages:
44

5-
```shell
6-
sudo apk add openssl ca-certificates
7-
```
5+
```shell
6+
sudo apk add openssl ca-certificates
7+
```
88

9-
3. Put NGINX signing public key to directory `/etc/apk/keys`:
9+
Put NGINX signing public key to directory `/etc/apk/keys`:
1010

11-
```shell
12-
sudo wget -O /etc/apk/keys/nginx_signing.rsa.pub https://cs.nginx.com/static/keys/nginx_signing.rsa.pub
13-
```
11+
```shell
12+
sudo wget -O /etc/apk/keys/nginx_signing.rsa.pub https://cs.nginx.com/static/keys/nginx_signing.rsa.pub
13+
```

content/includes/nap-waf/config/v5/host-based-nginx-instructions/common-steps-with-amzn2023.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1. Create the `/etc/ssl/nginx` directory:
1+
1. Create the `/etc/ssl/nginx/` directory:
22

33
```shell
44
sudo mkdir -p /etc/ssl/nginx

content/includes/nap-waf/config/v5/host-based-nginx-instructions/common-steps-with-dnf.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1. Create the `/etc/ssl/nginx` directory:
1+
1. Create the `/etc/ssl/nginx/` directory:
22

33
```shell
44
sudo mkdir -p /etc/ssl/nginx

content/includes/nap-waf/config/v5/host-based-nginx-instructions/common-steps-with-rhel-cen-74.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1. Create the `/etc/ssl/nginx` directory:
1+
1. Create the `/etc/ssl/nginx/` directory:
22

33
```shell
44
sudo mkdir -p /etc/ssl/nginx
Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +0,0 @@
1-
1. Set up the apk repository for mainline nginx packages:
2-
3-
```shell
4-
printf "%s%s%s\n" \
5-
"http://nginx.org/packages/mainline/alpine/v" \
6-
`egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release` \
7-
"/main" \
8-
| sudo tee -a /etc/apk/repositories
9-
```
10-
11-
2. Add the NGINX App Protect WAF v5 apk repository:
12-
13-
```shell
14-
printf "https://pkgs.nginx.com/app-protect-x-oss/alpine/v`egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release`/main\n" | sudo tee -a /etc/apk/repositories
15-
```
Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +0,0 @@
1-
1. Create the file named `/etc/yum.repos.d/nginx.repo` with the following contents:
2-
3-
```none
4-
[nginx-mainline]
5-
name=nginx mainline repo
6-
baseurl=http://nginx.org/packages/mainline/amzn/2023/$basearch/
7-
gpgcheck=1
8-
enabled=1
9-
gpgkey=https://nginx.org/keys/nginx_signing.key
10-
module_hotfixes=true
11-
```
12-
13-
1. Create the NGINX App Protect WAF v5 repository file, named `/etc/yum.repos.d/app-protect-x-oss.repo` with the following contents:
14-
15-
```none
16-
[app-protect-x-oss]
17-
name=nginx-app-protect repo
18-
baseurl=https://pkgs.nginx.com/app-protect-x-oss/amzn/2023/$basearch/
19-
sslclientcert=/etc/ssl/nginx/nginx-repo.crt
20-
sslclientkey=/etc/ssl/nginx/nginx-repo.key
21-
gpgcheck=0
22-
enabled=1
23-
```
Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
1. Create the file named `/etc/yum.repos.d/nginx.repo` with the following contents:
1+
Create the file named `/etc/yum.repos.d/nginx.repo` with the following contents:
22

3-
```none
4-
[nginx-mainline]
5-
name=nginx mainline repo
6-
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
7-
gpgcheck=1
8-
enabled=1
9-
gpgkey=https://nginx.org/keys/nginx_signing.key
10-
module_hotfixes=true
11-
```
3+
```none
4+
[nginx-mainline]
5+
name=nginx mainline repo
6+
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
7+
gpgcheck=1
8+
enabled=1
9+
gpgkey=https://nginx.org/keys/nginx_signing.key
10+
module_hotfixes=true
11+
```
1212

13-
2. Create NGINX App Protect WAF v5 repository file, named `/etc/yum.repos.d/app-protect-x-oss.repo` with the following contents:
13+
Create NGINX App Protect WAF v5 repository file, named `/etc/yum.repos.d/app-protect-x-oss.repo` with the following contents:
1414

15-
```none
16-
[app-protect-x-oss]
17-
name=nginx-app-protect repo
18-
baseurl=https://pkgs.nginx.com/app-protect-x-oss/centos/7/$basearch/
19-
sslclientcert=/etc/ssl/nginx/nginx-repo.crt
20-
sslclientkey=/etc/ssl/nginx/nginx-repo.key
21-
gpgcheck=0
22-
enabled=1
23-
```
15+
```none
16+
[app-protect-x-oss]
17+
name=nginx-app-protect repo
18+
baseurl=https://pkgs.nginx.com/app-protect-x-oss/centos/7/$basearch/
19+
sslclientcert=/etc/ssl/nginx/nginx-repo.crt
20+
sslclientkey=/etc/ssl/nginx/nginx-repo.key
21+
gpgcheck=0
22+
enabled=1
23+
```
2424

25-
3. Install the NGINX App Protect WAF v5 package.
25+
Install the NGINX App Protect WAF v5 package.
2626

27-
```shell
28-
sudo yum install app-protect-module-oss
29-
```
27+
```shell
28+
sudo yum install app-protect-module-oss
29+
```
3030

31-
When prompted to accept the GPG key, verify that the fingerprint matches `573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62`, and if so, accept it.
31+
When prompted to accept the GPG key, verify that the fingerprint matches `573B FD6B 3D8F BC64 1079 A6AB ABF5 BD82 7BD9 BF62`, and if so, accept it.
Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +0,0 @@
1-
1. Create the file named `/etc/yum.repos.d/nginx.repo` with the following contents:
2-
3-
```none
4-
[nginx-mainline]
5-
name=nginx mainline repo
6-
baseurl=http://nginx.org/packages/mainline/centos/8/$basearch/
7-
gpgcheck=1
8-
enabled=1
9-
gpgkey=https://nginx.org/keys/nginx_signing.key
10-
module_hotfixes=true
11-
```
12-
13-
2. Create NGINX App Protect WAF v5 repository file, named `/etc/yum.repos.d/app-protect-x-oss.repo` with the following contents:
14-
15-
```none
16-
[app-protect-x-oss]
17-
name=nginx-app-protect repo
18-
baseurl=https://pkgs.nginx.com/app-protect-x-oss/centos/8/$basearch/
19-
sslclientcert=/etc/ssl/nginx/nginx-repo.crt
20-
sslclientkey=/etc/ssl/nginx/nginx-repo.key
21-
gpgcheck=0
22-
enabled=1
23-
```
Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +0,0 @@
1-
1. Create the file named `/etc/yum.repos.d/nginx.repo` with the following contents:
2-
3-
```none
4-
[nginx-mainline]
5-
name=nginx mainline repo
6-
baseurl=http://nginx.org/packages/mainline/centos/9/$basearch/
7-
gpgcheck=1
8-
enabled=1
9-
gpgkey=https://nginx.org/keys/nginx_signing.key
10-
module_hotfixes=true
11-
```
12-
13-
2. Create NGINX App Protect WAF v5 repository file, named `/etc/yum.repos.d/app-protect-x-oss.repo` with the following contents:
14-
15-
```none
16-
[app-protect-x-oss]
17-
name=nginx-app-protect repo
18-
baseurl=https://pkgs.nginx.com/app-protect-x-oss/centos/9/$basearch/
19-
sslclientcert=/etc/ssl/nginx/nginx-repo.crt
20-
sslclientkey=/etc/ssl/nginx/nginx-repo.key
21-
gpgcheck=0
22-
enabled=1
23-
```
Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1 @@
1-
1. Add the NGINX Open Source repository:
21

3-
```shell
4-
echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \
5-
http://nginx.org/packages/mainline/debian `lsb_release -cs` nginx" | \
6-
sudo tee /etc/apt/sources.list.d/nginx.list
7-
```
8-
9-
2. Set up repository pinning to prefer our packages over distribution-provided ones:
10-
11-
```shell
12-
echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" | \
13-
sudo tee /etc/apt/preferences.d/99nginx
14-
```
15-
16-
3. Add the NGINX App Protect WAF v5 repository:
17-
18-
```shell
19-
printf "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \
20-
https://pkgs.nginx.com/app-protect-x-oss/debian `lsb_release -cs` nginx-plus\n" | \
21-
sudo tee /etc/apt/sources.list.d/nginx-app-protect.list
22-
```

0 commit comments

Comments
 (0)