Installing nginx

The easiest way to install nginx is to use apt-get.

sudo apt-get install nginx

By default, nginx serves pages from /usr/share/nginx/www, but most Linux admins
tend to be more familiar with the location /var/www that Apache uses by default.
It does not matter where you keep the files, as long as you keep it well structured.
We will use /var/www in this chapter.

sudo mkdir /var/wwww

Inside this directory, we will create more directories that will hold various
virtual hosts. Virtual hosts are domain names that tell the web server about the
configuration for that requested domain. We will create a holding directory named
local and a directory named web that will hold the web files.

mkdir /var/www/local/web

No comments:

Post a Comment