Restart the NGINX service on a Ubuntu machine?

Answered
looper003 asked this question 12 days ago
looper003 12 days ago

I have a server in the cloud that is running a NGINX web server for my website. Its operating system is Ubuntu 20.04.

After I make some changes to NGINX's configuration files, how do I restart the NGINX server so those changes go into effect?

Thanks in advance for the help!

2 suggested answers
itsbambi 12 days ago
sudo systemctl restart nginx
0 replies
nick 12 days ago

Check your NGINX configuration files for syntax errors:

sudo nginx -t

If no errors were found, restart NGINX with this command:

sudo systemctl restart nginx
0 replies
Answered