Installing Nginx | ubuntu 18.04 nginx php mysql
PrerequisitesYoushoulduseanon-rootuseraccountwithsudoprivileges.Pleaseseethe InitialserversetupforUbuntu18.04/19.10[1] guideformoredetails.1.InstallNginxLet’sbeginbyupdatingthepackagelistsandinstalling NginxonUbuntu18.04/19.10.Belowwehavetwocommandsseparatedby &&.Thefirstcommandwillupdatethepackageliststoensureyougetthelatestversionanddependenciesfor Nginx.Thesecondcommandwillthendownloadandinstall Nginx.sudoaptupdate&&sudoaptinstallnginxOnceinstalled,checktoseeiftheNginxserv...
PrerequisitesYou should use a non-root user account with sudo privileges. Please see the Initial server setup for Ubuntu 18.04 / 19.10[1] guide for more details.
1. Install NginxLet’s begin by updating the package lists and installing Nginx on Ubuntu 18.04 / 19.10. Below we have two commands separated by &&. The first command will update the package lists to ensure you get the latest version and dependencies for Nginx. The second command will then download and install Nginx.
sudo apt update && sudo apt install nginxOnce installed, check to see if the Nginx service is running.
sudo service nginx statusIf Nginx is running correctly, you should see a green Active state below.
● nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: active (running) since Wed 2018-05-09 20:42:29 UTC; 2min 39s ago Docs: man:nginx(8) Process: 27688...