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
In this section, you install and configure NGINX, a high-performance web server and reverse proxy, on your Arm-based Azure instance. NGINX is widely used to serve static content, handle large volumes of connections efficiently, and act as a load balancer. Running it on your Azure Cobalt 100 virtual machine allows you to serve web traffic securely and reliably.
10
12
11
-
## NGINX Installation on Ubuntu Pro 24.04 LTS
12
-
13
-
In this section, you will install and configure NGINX, a high-performance web server and reverse proxy on your Arm-based Azure instance. NGINX is widely used to serve static content, handle large volumes of connections efficiently, and act as a load balancer. Running it on your Azure Cobalt-100 virtual machine will allow you to serve web traffic securely and reliably.
14
-
15
-
### Install NGINX
13
+
## Install NGINX
16
14
17
15
Run the following commands to install and enable NGINX:
18
16
@@ -23,29 +21,31 @@ sudo systemctl enable nginx
23
21
sudo systemctl start nginx
24
22
```
25
23
26
-
###Verify NGINX
24
+
## Verify NGINX installation
27
25
28
26
Check the installed version of NGINX:
29
27
30
28
```console
31
29
nginx -v
32
30
```
33
-
The output should look like:
31
+
32
+
Expected output:
34
33
35
34
```output
36
35
nginx version: nginx/1.24.0 (Ubuntu)
37
36
```
38
-
{{% notice Note %}}
39
-
40
-
The [Arm Ecosystem Dashboard](https://developer.arm.com/ecosystem-dashboard/) recommends NGINX version 1.20.1 as the minimum recommended on the Arm platforms.
41
37
38
+
{{% notice Note %}}
39
+
The [Arm Ecosystem Dashboard](https://developer.arm.com/ecosystem-dashboard/) recommends NGINX version 1.20.1 or later for Arm platforms.
42
40
{{% /notice %}}
43
41
44
-
You can confirm that NGINX is running correctly by checking its systemd service status:
42
+
You can also confirm that NGINX is running correctly by checking its systemd service status:
43
+
45
44
```console
46
45
sudo systemctl status nginx
47
46
```
48
-
You should see output similar to:
47
+
48
+
Expected output:
49
49
50
50
```output
51
51
● nginx.service - A high performance web server and a reverse proxy server
@@ -63,19 +63,20 @@ You should see output similar to:
63
63
├─1944 "nginx: worker process"
64
64
└─1945 "nginx: worker process"
65
65
```
66
-
If you see Active: active (running), NGINX is successfully installed and running.
67
66
67
+
If you see `Active: active (running)`, NGINX is successfully installed and running.
68
+
69
+
## Validate with curl
68
70
69
-
### Validation with curl
70
-
Validation with `curl` confirms that NGINX is correctly installed, running, and serving **HTTP** responses.
71
+
You can validate that NGINX is serving HTTP responses using `curl`:
71
72
72
-
Run the following command to send a HEAD request to the local NGINX server:
73
73
```console
74
74
curl -I http://localhost/
75
75
```
76
-
The -I option tells curl to request only the HTTP response headers, without downloading the page body.
77
76
78
-
You should see output similar to:
77
+
The **-I** option requests only the HTTP response headers without downloading the page body.
78
+
79
+
Expected output:
79
80
80
81
```output
81
82
HTTP/1.1 200 OK
@@ -94,19 +95,18 @@ Output summary:
94
95
- Server: nginx/1.24.0: Shows that the server is powered by NGINX.
95
96
- Content-Type, Content-Length, Last-Modified, ETag: Provide details about the served file and its metadata.
96
97
97
-
This step verifies that your NGINX installation is functional at the system level, even before exposing it to external traffic. It’s a quick diagnostic check that is useful when troubleshooting connectivity issues.
98
-
99
-
### Allowing HTTP Traffic
98
+
This confirms that NGINX is functional at the system level, even before exposing it to external traffic.
100
99
101
-
When you created your VM instance earlier, you configured the Azure Network Security Group (NSG) to allow inbound HTTP (port 80) traffic. This means the Azure-side firewall is already open for web requests.
102
-
On the VM itself, you still need to make sure that the Uncomplicated firewall (UFW) which is used to manage firewall rules on Ubuntu allows web traffic. Run:
100
+
## Allow HTTP traffic
103
101
102
+
When you created your VM instance earlier, you configured the Azure **Network Security Group (NSG)** to allow inbound HTTP (**port 80**) traffic. On the VM itself, you must also allow traffic through the Ubuntu firewall (**UFW**). Run:
104
103
105
104
```console
106
105
sudo ufw allow 80/tcp
107
106
sudo ufw enable
108
107
```
109
-
The output from this command should look like:
108
+
109
+
Expected output:
110
110
111
111
```output
112
112
sudo ufw enable
@@ -115,12 +115,15 @@ Rules updated (v6)
115
115
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
116
116
Firewall is active and enabled on system startup
117
117
```
118
-
You can verify that HTTP is now allowed with:
118
+
119
+
Verify that HTTP is allowed with:
119
120
120
121
```console
121
122
sudo ufw status
122
123
```
123
-
You should see an output similar to:
124
+
125
+
Expected output:
126
+
124
127
```output
125
128
Status: active
126
129
@@ -131,17 +134,19 @@ To Action From
131
134
8080/tcp (v6) ALLOW Anywhere (v6)
132
135
80/tcp (v6) ALLOW Anywhere (v6)
133
136
```
134
-
This ensures that both Azure and the VM-level firewalls are aligned to permit HTTP requests.
135
137
136
-
### Accessing the NGINX Default Page
138
+
This ensures that both Azure and the VM-level firewalls permit HTTP requests.
137
139
138
-
You can now access the NGINX default page from your Virtual machine’s public IP address. Run the following command to display your public URL:
140
+
## Access the NGINX default page
141
+
142
+
You can now access the NGINX default page from your VM’s public IP address. Run:
139
143
140
144
```console
141
145
echo "http://$(curl -s ifconfig.me)/"
142
146
```
143
-
Copy the printed URL and open it in your browser. You should see the default NGINX welcome page, which confirms a successful installation and that HTTP traffic is reaching your VM.
144
147
145
-

148
+
Copy the printed URL and open it in your browser. You should see the default NGINX welcome page, which confirms that HTTP traffic is reaching your VM.
149
+
150
+

146
151
147
-
At this stage, your NGINX installation is complete. You are now ready to proceed with baseline testing and further configuration.
152
+
At this stage, your NGINX installation is complete. You are ready to begin baseline testing and further configuration.
0 commit comments