
- Step 1: Update your apt package manager by running command: sudo apt update,
- Step 2: Now lets run the command sudo apt install nginx,
# sudo apt install nginx Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: fontconfig-config fonts-dejavu-core iproute2 libatm1 libbsd0 libcap2-bin libelf1 ... ... libxau6 libxcb1 libxdmcp6 libxpm4 libxslt1.1 libxtables12 nginx-common nginx-core ucf Suggested packages: iproute2-doc libgd-tools fcgiwrap nginx-doc The following NEW packages will be installed: fontconfig-config ... ... nginx nginx-common nginx-core ucf 0 upgraded, 34 newly installed, 0 to remove and 19 not upgraded. Need to get 4755 kB of archives. After this operation, 15.9 MB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 libbsd0 arm64 0.10.0-1 [43.7 kB] Get:2 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 libelf1 arm64 0.176-1.1build1 [44.2 kB] Get:3 http://ports.ubuntu.com/ubuntu-ports focal/main arm64 libmnl0 arm64 1.0.4-2 [11.3 kB] ... ... Get:32 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 libnginx-mod-stream arm64 1.18.0-0ubuntu1.2 [63.2 kB] Get:33 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 nginx-core arm64 1.18.0-0ubuntu1.2 [399 kB] Get:34 http://ports.ubuntu.com/ubuntu-ports focal-updates/main arm64 nginx all 1.18.0-0ubuntu1.2 [3620 B] ... ... Fetched 4755 kB in 5s (951 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libbsd0:arm64. (Reading database ... 11528 files and directories currently installed.) Preparing to unpack .../00-libbsd0_0.10.0-1_arm64.deb ... Unpacking libbsd0:arm64 (0.10.0-1) ... ... Setting up libnginx-mod-http-image-filter (1.18.0-0ubuntu1.2) ... Setting up nginx-core (1.18.0-0ubuntu1.2) ... Not attempting to start NGINX, port 80 is already in use. Setting up nginx (1.18.0-0ubuntu1.2) ... Processing triggers for systemd (245.4-4ubuntu3.15) ... Processing triggers for libc-bin (2.31-0ubuntu9.2) ... Progress: [ 99%] [#############################################################]
- Step 3: Now lets create a sample html page,
# cd /var/www # mkdir root # cd root # nano index.html
Add a sample html content in the index.html file to test,
<h1>Hello from Nginx Server on Ubuntu!&tl;/h1>
- Step 4: Now lets start the server: # sudo service nginx start
- Step 5: Now lets test that the server is up,
curl localhost/root/index.html <h1>Hello from Nginx Server on Ubuntu!</h1>
- Install Oh My Zsh on Ubuntu Docker complete steps
- Installing Home-brew on Ubuntu
- Install Golang (Go) on Ubuntu
- Install specific JRE on Ubuntu using apt
- How to stop/start/restart apache server using command [Ubuntu]
- How to install zsh shell on Ubuntu
- Quick steps to install Nginx on Ubuntu Linux
- How to know current Ubuntu Linux version via terminal command
- Add new user in Ubuntu Linux using Terminal Command
- Fix Ubuntu /bin/sh: 1: zsh: not found error
- How to install Python on Ubuntu
- [Fix] Ubuntu E: Unable to locate package sudo error
- How to stop MongoDB Server running on Ubuntu
- Install postgres Client using apt-get command
- How to kill service running on a port on Ubuntu Linux
- [fix] openssl No such file or directory error C++
- Fix - sudo: systemctl: command not found
- Access Windows share folder in Ubuntu Device in Network
- Add or remove users from sudo group - Ubuntu
- Quickly install Apache Server on Ubuntu Linux
- Fix: Ubuntu (Linux) - bash: sudo: command not found error
- What does b prefix before a String mean in Python? - Python
- How to check installed Tomcat version - Tomcat
- Get Wifi Details : Android Programming - Android
- Spring Boot: NamedParameterJdbcTemplate batch insert example - Java
- How to Compare Strings in Bash - Bash
- Fix: Eclipse Connection time out: github.com - Eclipse
- How to get UTC (GMT) time using JavaScript - JavaScript
- How to stop MongoDB Server running on Ubuntu - Ubuntu