5.Install Nginx
OVERVIEW
Nginx (pronounced “engine x”) is a free, open-source, high-performance HTTP server.
Following the steps below will show you how to install Nginx and test its functionality. Be sure to follow our more advanced how-to on configuring virtual hosts afterwards, which will give you the ability to serve multiple websites from your (VPS) Server.
Install Nginx with command
5.a)
VirtualPrivateServer
$apt-get install nginx
By default, Nginx will not start automatically, so you need to use the following command. Other valid options are stop
and restart
.
To restart we need to run the following command:
VirtualPrivateServer
$sudo /etc/init.d/nginx start
The results should be like the following.
Starting nginx
: the configuration file /etc/nginx/nginx.conf syntax is ok configuration file /etc/nginx/nginx.conf test is successful nginx.
Test Nginx by pointing your web browser to your domain name or IP address. You should see the default Nginx page as shown in Figure 1 below: