Since Ubuntu 18.04 has been released, it should have the better way about using the systemctl to control Nginx service.
systemctl
For example,
sudo systemctl status nginx
sudo systemctl reload nginx
sudo systemctl restart nginx
sudo systemctl enable --now nginx
sudo systemctl disable --now nginx
By default, using the sudo apt install nginx will install a specific Nginx version that included in official Ubuntu mirror.
sudo apt install nginx
To install other/specific or upgrade Nginx versions, it can use the ondrej/nginx to resolve this issue :).
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Since Ubuntu 18.04 has been released, it should have the better way about using the
systemctlto control Nginx service.For example,
sudo systemctl status nginxto check Nginx service status.sudo systemctl reload nginxto reload Nginx setting.sudo systemctl restart nginxto restart Nginx service daemon.sudo systemctl enable --now nginxto enable Nginx service daemon starting on boot.sudo systemctl disable --now nginxto disable Nginx service daemon starting on boot.By default, using the
sudo apt install nginxwill install a specific Nginx version that included in official Ubuntu mirror.To install other/specific or upgrade Nginx versions, it can use the ondrej/nginx to resolve this issue :).