how restart nginx from init.d code example Example 1: restart nginx sudo systemctl restart nginx Example 2: stop nginx server sudo systemctl stop nginx