Nginx Notebook
Basic
check config file syntax
sudo nginx -t
reload nginx using the new config file
sudo nginx -s reload
Examples
echo client ip
very usefull network info tool
location /ip {
default_type text/plain;
return 200 "$remote_addr\n";
}
# to use it
curl cheng10.cc/ip
>> 114.114.114.114