Nginx helpful tips

to set root location – etc/nginx/sites-enabled/default

root /srv/custom;

Example

# SSL configuration
server {
  listen 443 ssl http2 default_server;
  listen [::]:443 ssl http2 default_server;
  server_name negativerocks.com;
  ssl_certificate /etc/nginx/ssl/negativerocks.co.uk/fullchain.pem;
  ssl_certificate_key /etc/nginx/ssl/negativerocks.co.uk/key.pem;
  include snippets/ssl-params.conf;
  client_max_body_size 40M;
  server_tokens off;
  root /srv/custom;

stop start restart nginx

sudo systemctl start nginx 
sudo systemctl stop nginx 
sudo systemctl restart nginx