10

DISCOUNT

REGISTER NOW

How to Install Nginx on Ubuntu 16.04 Instance

Nginx is one of the most popular web server in the world. In many cases, Nginx uses less resources than Apache web server.

Before you install Nginx, you should connect your instance via ssh and you should have user with sudo privileges.

We will begin by updating our system, after that we can install nginx packages.

$ sudo apt-get update
$ sudo apt-get install nginx

 

After installation we can check our system to make sure the nginx service is runnig by typing:

$ systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2017-12-05 06:41:23 UTC; 1min 29s ago
Main PID: 4738 (nginx)
CGroup: /system.slice/nginx.service
├─4738 nginx: master process /usr/sbin/nginx -g daemon on; master_process on
├─4739 nginx: worker process
└─4740 nginx: worker process

 As you can see from above terminal output, our Nginx service is running. However, we need to test it on a web browser. After our installation is complete, we will write our instance floating IP address to web browser to access our Nginx default page. You should see the default "Welcome to nginx!" page, which should look like this:

 nginx.png

 

Note : If you can not access the above page, you need to open the TCP 80 port of our instance from Skyatlas panel. You wil need to follow the steps in our Access and Security Settings  article for security policy.

 

 

 

 

 

Have more questions? Submit a request
Powered by Zendesk