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
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/nginx-on-azure/_index.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,24 +7,22 @@ cascade:
7
7
8
8
minutes_to_complete: 30
9
9
10
-
who_is_this_for: This Learning Path introduces NGINX deployment on Microsoft Azure Cobalt 100 (Arm-based) virtual machine. It is intended for system administrators and developers looking to deploy and benchmark NGINX on Arm architecture with minimal adjustments from traditional x86_64 environments.
10
+
who_is_this_for: This Learning Path introduces NGINX deployment on Microsoft Azure Cobalt 100 (Arm-based) virtual machine. It is intended for system administrators and developers looking to deploy and benchmark NGINX on Arm-based instances.
11
11
12
12
learning_objectives:
13
13
- Start an Azure Arm64 virtual machine using the Azure console and Ubuntu Pro 24.04 LTS as the base image.
14
-
- Deploy the NGINX web server on the Azure Arm64 virtual machine running Ubuntu Pro 24.04 LTS.
14
+
- Deploy the NGINX web server on the Azure Arm64 virtual machine.
15
15
- Configure and test a static website using NGINX on the virtual machine.
16
16
- Perform baseline testing and benchmarking of NGINX in the Ubuntu Pro 24.04 LTS Arm64 virtual machine environment.
17
17
18
18
19
19
prerequisites:
20
20
- A [Microsoft Azure](https://azure.microsoft.com/) account with access to Cobalt 100 based instances (Dpsv6).
21
-
- Familiarity with the [NGINX architecture](https://www.nginx.com/) and deployment practices on Arm64 platforms.
22
-
- Network settings (firewalls and security groups) should allow inbound communication on ports 22 (SSH) and 80 (HTTP).
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/nginx-on-azure/baseline.md
+46-25Lines changed: 46 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,17 +8,18 @@ layout: learningpathall
8
8
9
9
10
10
### Baseline testing with a static website on NGINX
11
-
Perform baseline testing of NGINX on an **Ubuntu Pro 24.04 LTS** virtual machine by deploying a custom static HTML page. This verifies that NGINX is correctly serving content on the Arm64 platform.
11
+
Once NGINX is installed and serving the default welcome page, the next step is to verify that it can serve your own content. A baseline test using a simple static HTML site ensures that NGINX is correctly configured and working as expected on your Ubuntu Pro 24.04 LTS virtual machine.
12
12
13
13
1. Create a Static Website Directory:
14
14
15
15
Prepare a folder to host your HTML content.
16
16
```console
17
-
mkdir -p ~/my-static-site
17
+
mkdir -p /var/www/my-static-site
18
+
cd /var/www/my-static-site
18
19
```
19
20
2. Create an HTML file and Web page:
20
21
21
-
Create a HTML file `nano my-static-site/index.html` with the content below to design a visually appealing static landing page.
22
+
Create a simple HTML file to replace the default NGINX welcome page. Using a file editor of your choice create the file `index.html` with the content below:
22
23
23
24
```html
24
25
<!DOCTYPE html>
@@ -61,69 +62,89 @@ Create a HTML file `nano my-static-site/index.html` with the content below to de
61
62
</body>
62
63
</html>
63
64
```
64
-
3.Move the Website to NGINX's Accessible Directory:
65
+
3.Adjust Permissions:
65
66
66
-
Since NGINX runs under the `www-data` user and may not have access to files inside `/home/ubuntu`, move the site to a directory where NGINX has permissions by default:
67
+
Ensure that NGINX (running as the www-data user) can read the files in your custom site directory:
This sets the ownership of the directory and files so that the NGINX process can serve them without permission issues.
73
73
74
-
4. Create NGINX Config File to Serve Static Website:
74
+
4. Update NGINX Configuration:
75
+
76
+
Point NGINX to serve files from your new directory by creating a dedicated configuration file under /etc/nginx/conf.d/.
75
77
76
-
Point NGINX to serve your static HTML content.
77
78
```console
78
79
sudo nano /etc/nginx/conf.d/static-site.conf
79
80
```
80
-
Now, add the following configuration:
81
+
Add the following configuration to it:
81
82
82
-
```NGINX
83
+
```console
83
84
server {
84
-
listen 80;
85
-
server_name localhost;
85
+
listen 80 default_server;
86
+
listen [::]:80 default_server;
87
+
server_name _;
88
+
89
+
root /var/www/my-static-site;
90
+
index index.html;
86
91
87
92
location / {
88
-
root /var/www/my-static-site;
89
-
index index.html;
93
+
try_files $uri $uri/ =404;
90
94
}
91
95
92
96
access_log /var/log/nginx/static-access.log;
93
-
error_log /var/log/nginx/static-error.log;
97
+
error_log /var/log/nginx/static-error.log;
94
98
}
95
99
```
96
-
Make sure `/home/ubuntu/my-static-site` is the correct path to your **index.html**.
100
+
This configuration block tells NGINX to:
101
+
- Listen on port 80 (both IPv4 and IPv6).
102
+
- Serve files from /var/www/my-static-site.
103
+
- Use index.html as the default page.
104
+
- Log access and errors to dedicated log files for easier troubleshooting.
97
105
98
-
5. Test the NGINX Configuration:
106
+
Make sure the path to your `index.html` file is correct before saving.
107
+
108
+
5. Disable the default site:
109
+
110
+
By default, NGINX comes with a packaged default site configuration. Since you have created a custom config, it is good practice to disable the default to avoid conflicts:
111
+
112
+
```console
113
+
sudo unlink /etc/nginx/sites-enabled/default
114
+
```
115
+
116
+
6. Test the NGINX Configuration:
117
+
118
+
Before applying your changes, always test the configuration to make sure there are no syntax errors:
99
119
100
120
```console
101
121
sudo nginx -t
102
122
```
103
-
You should see an output similar to:
123
+
You should see output similar to:
104
124
```output
105
125
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
106
126
nginx: configuration file /etc/nginx/nginx.conf test is successful
107
127
```
128
+
If you see both lines, your configuration is valid.
108
129
109
-
6. Reload or Restart NGINX:
130
+
7. Reload or Restart NGINX:
110
131
111
-
Apply configurationchanges and restart the web server.
132
+
After testing the configuration, apply your changes by reloading or restarting the NGINX service:
112
133
```console
113
134
sudo nginx -s reload
114
135
sudo systemctl restart nginx
115
136
```
116
137
117
-
7. Test the Static Website on browser:
138
+
8. Test the Static Website in a browser:
118
139
119
140
Access your website at your public IP on port 80.
141
+
120
142
```console
121
143
http://<your-vm-public-ip>/
122
144
```
123
-
Make sure port 80 is open in your Azure Network Security Group (NSG).
124
145
125
-
8. You should see the NGINX welcome page confirming a successful deployment:
146
+
9. You should see the NGINX welcome page confirming a successful deployment:
This verifies the basic functionality of NGINX installation before proceeding to the benchmarking.
150
+
This verifies the basic functionality of NGINX installation and you can now proceed to benchmarking the performance of NGINX on your Arm-based Azure VM.
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/nginx-on-azure/benchmarking.md
+18-46Lines changed: 18 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ layout: learningpathall
8
8
9
9
## NGINX Benchmarking by ApacheBench
10
10
11
-
**ApacheBench (ab)** is a lightweight command-line tool for benchmarking HTTP servers. It measures performance metrics like requests per second, response time, and throughput under concurrent load.
11
+
To understand how your NGINX deployment performs under load, you can benchmark it using ApacheBench (ab). ApacheBench is a lightweight command-line tool for benchmarking HTTP servers. It measures performance metrics like requests per second, response time, and throughput under concurrent load.
|| Total (min / mean / stdev / median / max) | 1 / 2 / 0.1 / 2 / 2 |
168
140
169
-
### Highlights from Ubuntu Pro 24.04 LTS Arm64 Benchmarking
141
+
### Analysis of results from NGINX benchmarking on Arm-based Azure Cobalt-100
170
142
171
-
When comparing the results on Arm64 vs x86_64 virtual machines:
143
+
These benchmark results highlight the strong performance characteristics of NGINX running on Arm64-based Azure VMs (such as the D4ps_v6 instance type):
172
144
173
-
-Achieved **31,523.86 requests/sec**, demonstrating high throughput under concurrent load.
145
+
-High Requests Per second(31,523.86 requests/sec), demonstrating high throughput under concurrent load.
174
146
- Response time per request averaged **1.586 ms**, indicating efficient handling of requests with minimal delay.
175
147
-**Zero failed requests**, confirming stability and reliability during testing.
You have now benchmarked NGINX on an Azure Cobalt 100 Arm64 virtual machine and compared results with x86_64.
150
+
Overall, these results illustrate that NGINX on Arm64 machines provides a highly performant solution for web workloads on Azure. You can also use the same benchmarking framework to compare results on equivalent x86-based Azure instances, which provides useful insight into relative performance and cost efficiency across architectures.
0 commit comments