Before performing complex operations, let's learn the basic information of the nginx config file.
Before writing information for the Config File, we need to access the file, please execute the following command
sudo nano /etc/nginx/nginx.conf
After executing the above command, we will add the following basic information:
events {
}
http {
server {
listen 80;
server_name nglearns.test;
return 200 "Hello";
}
}
If you have worked with REST APIs, you will recognize that the Server/VM will return a result with a status of 200 and content is "Hello".