Setup a light web server with NGINX

Problem:

You care running a Raspberry pi zero and you need a fast way to acess your files/pictures or cam.

Why not to crate a light web serve to do it ?

Solution:


1.- Ensure that your system is up.todate.

sudo apt-get update
sudo apt-get upgrade
2.- Install Ngix
sudo apt-get install nginx
3.- start the webserver
sudo systemctl start nginx
4.- Check your hostname or IP to access to the web server:
hostname -i   "show you ip address
hostname  "show your host name
just open it using http://<hostname> or http://<ipaddress>
5.- change Nginx configuration, path, port, etc...
sudo nano /etc/nginx/nginx.conf
6.- start the web server once the system boot edition rc.local.
sudo nano /etc/rc.local
add the next line to the file and save it:  
 sudo systemctl start nginx
Faq's:
What is the defult www folder after nginx installation ?
-> you can find it in /var/www/html/

Source: