Skip to content

Commit ea97167

Browse files
Updates
1 parent e5e3083 commit ea97167

File tree

1 file changed

+38
-33
lines changed
  • content/learning-paths/servers-and-cloud-computing/nginx-on-azure

1 file changed

+38
-33
lines changed
Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
---
2-
title: Install NGINX
2+
title: "Install NGINX"
33
weight: 4
44

55
### FIXED, DO NOT MODIFY
66
layout: learningpathall
77
---
88

9+
# Install NGINX on Ubuntu Pro 24.04 LTS
910

11+
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.
1012

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
1614

1715
Run the following commands to install and enable NGINX:
1816

@@ -23,29 +21,31 @@ sudo systemctl enable nginx
2321
sudo systemctl start nginx
2422
```
2523

26-
### Verify NGINX
24+
## Verify NGINX installation
2725

2826
Check the installed version of NGINX:
2927

3028
```console
3129
nginx -v
3230
```
33-
The output should look like:
31+
32+
Expected output:
3433

3534
```output
3635
nginx version: nginx/1.24.0 (Ubuntu)
3736
```
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.
4137

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.
4240
{{% /notice %}}
4341

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+
4544
```console
4645
sudo systemctl status nginx
4746
```
48-
You should see output similar to:
47+
48+
Expected output:
4949

5050
```output
5151
● nginx.service - A high performance web server and a reverse proxy server
@@ -63,19 +63,20 @@ You should see output similar to:
6363
├─1944 "nginx: worker process"
6464
└─1945 "nginx: worker process"
6565
```
66-
If you see Active: active (running), NGINX is successfully installed and running.
6766

67+
If you see `Active: active (running)`, NGINX is successfully installed and running.
68+
69+
## Validate with curl
6870

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`:
7172

72-
Run the following command to send a HEAD request to the local NGINX server:
7373
```console
7474
curl -I http://localhost/
7575
```
76-
The -I option tells curl to request only the HTTP response headers, without downloading the page body.
7776

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:
7980

8081
```output
8182
HTTP/1.1 200 OK
@@ -94,19 +95,18 @@ Output summary:
9495
- Server: nginx/1.24.0: Shows that the server is powered by NGINX.
9596
- Content-Type, Content-Length, Last-Modified, ETag: Provide details about the served file and its metadata.
9697

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.
10099

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
103101

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:
104103

105104
```console
106105
sudo ufw allow 80/tcp
107106
sudo ufw enable
108107
```
109-
The output from this command should look like:
108+
109+
Expected output:
110110

111111
```output
112112
sudo ufw enable
@@ -115,12 +115,15 @@ Rules updated (v6)
115115
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
116116
Firewall is active and enabled on system startup
117117
```
118-
You can verify that HTTP is now allowed with:
118+
119+
Verify that HTTP is allowed with:
119120

120121
```console
121122
sudo ufw status
122123
```
123-
You should see an output similar to:
124+
125+
Expected output:
126+
124127
```output
125128
Status: active
126129
@@ -131,17 +134,19 @@ To Action From
131134
8080/tcp (v6) ALLOW Anywhere (v6)
132135
80/tcp (v6) ALLOW Anywhere (v6)
133136
```
134-
This ensures that both Azure and the VM-level firewalls are aligned to permit HTTP requests.
135137

136-
### Accessing the NGINX Default Page
138+
This ensures that both Azure and the VM-level firewalls permit HTTP requests.
137139

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:
139143

140144
```console
141145
echo "http://$(curl -s ifconfig.me)/"
142146
```
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.
144147

145-
![NGINX](images/nginx-browser.png)
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+
![NGINX default welcome page in a web browser on an Azure VM alt-text#center](images/nginx-browser.png)
146151

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

Comments
 (0)