Quantcast
Channel: Ghan – Code Insects – Insects who Code
Viewing all articles
Browse latest Browse all 26

How to install nginx on Ubuntu 14.x server ?

$
0
0

Now days nginx is most powerfull web server because it is more resource-friendly than Apache in most cases. It can be used as a web server or a reverse proxy.

Install Nginx

we can install nginx on ubuntu server very eaisly because nginx package is available in ubuntu default repositories. Before install any package on server, first of all we should update our local package index on sever. To update local index on server use following command.

sudo apt-get update

Above command will update local package index on server. Now we’ll install nginx using following command.

sudo apt-get install nginx

This command will download latest nginx package and will install it on your server. After installing the nginx you can check it by visiting following url on webbrowser.

http://{server_domain_name_or_ip}

you will see output like below on your screen.

nginx

To add/upload files to server, Your default document root will be /usr/share/nginx/html/. you can add/update/upload files to this server.

Start/Stop/Restart Nginx

As you have sucessfully installed nginx server, Now we should also have knowledge of some basic commands required to manage nginx server

To start Nginx Server

sudo /etc/init.d/nginx start

or

sudo service nginx start

To Stop Nginx Server

sudo /etc/init.d/nginx stop

or

sudo service nginx stop

To stop and then start Nginx Server

sudo /etc/init.d/nginx restart

or

sudo service nginx restart

Now you have sucessfully installed nginx on your server, I will show you how to install php-fpm and its supporting libraries on server in next post. Stay tuned…


Viewing all articles
Browse latest Browse all 26

Trending Articles