How to install nginx 1.10 in ubuntu 16.04

How to install nginx 1.10 in ubuntu desktop 16.04

use sudo to install.

sudo apt-get install nginx


Do you want to continue? Y <enter>

after finish, u can check NGINX version using this command

nginx -v


u can check your installation using web browser. head to localhost


now u have a working NGINX environment.u can start upload your webpage.

NGINX settings.
where is setting for NGINX in ubuntu?
/etc/nginx

How to set my first webhost in nginx?
/etc/nginx/sites-enable

what is the difference between sites-available and sites-enable?
sites-available is not live until it is linked to sites-enable. while any settings in sites-enable is live and running.

Where is my default website directory in NGINX?
as per default, it will be in:-
/var/www/html/

How to create my first web page in NGINX?
-use your prefered text editor. eg nano,vi,gedit.

 
or

Open web browser and browse to your file.
localhost/hello.html

Comments