DEV Community

Discussion on: Installing Nginx on Ubuntu

Collapse
 
peter279k profile image
peter279k • Edited

Since Ubuntu 18.04 has been released, it should have the better way about using the systemctl to control Nginx service.

For example,

  • You can use the sudo systemctl status nginx to check Nginx service status.
  • Using the sudo systemctl reload nginx to reload Nginx setting.
  • Using the sudo systemctl restart nginx to restart Nginx service daemon.
  • Using the sudo systemctl enable --now nginx to enable Nginx service daemon starting on boot.
  • Using the sudo systemctl disable --now nginx to disable Nginx service daemon starting on boot.

By default, using the sudo apt install nginx will 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 :).