In this article, we will learn How to download and Install NGINX on Ubuntu 18.04.
Following are the steps to download and Install NGINX on Ubuntu 18.04 Google Cloud Compute Engine VM Instance.
First, create a new VM instance for Ubuntu 18.04. We are using the following configuration for our demo VM machine.
Open SSH in the browser for the new VM Instance.
Ubuntu 18.04 VM Instance running and we have access for SSH. Next, we will install NGINX. NGINX is available in Ubuntu's default repositories. We will install NGINX from the default repositories. Execute the following command to install NGINX.
sudo apt update
sudo apt install nginx
Above two commands will install NGINX on Ubuntu. Now, we can check the status for NGINX. Execute the below command to check NGINX Status
systemctl status nginx
NGINX status is active and it is running. Let's check our server IP in the browser.
Note: You can also use your domain if it is pointing to the server IP.
Following are the important commands for NGINX.
NGINX Content: You can find the default NGINX HTML page at /var/www/html.
NGINX Server Configuration: All NGINX Configurations files are available at /etc/nginx
NGINX Server Logs
/var/log/nginx/access.log: Every request to our web server is recorded in this log file.
/var/log/nginx/error.log: All the NGINX errors are recorded in this log file.
In the Next article, we will learn How to download and Install PHP, MySQL, and PHPMyAdmin on our Ubuntu 18.04 server.
Please login to post your valuable comments.
Get the latest vLemonn news first