From the course: Linux System Engineer: Web Servers and DNS Using Apache, NGINX, and BIND

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Create a server block with NGINX

Create a server block with NGINX - Red Hat Enterprise Linux Tutorial

From the course: Linux System Engineer: Web Servers and DNS Using Apache, NGINX, and BIND

Start my 1-month free trial

Create a server block with NGINX

- [Instructor] When a Apache to host more than one website, we create virtual hosts. The equivalent in NGINX is called a server block. In this exercise we'll disable Apache, start NGINX, and create a new server block. You'll want to be logged into rhhost1 with the terminal open. We'll begin by stopping the Apache service, and disabling it so won't start on boot. In the terminal type in sudu systemctl stop httpd. Type in your password if prompted. Then bring your line back and change stop to disable. (typing on keyboard) Now let's start NGINX and enable it. Type in sudu systemctl start nginx and hit Enter. Then bring your line back and change start to enable. To make sure this is working, use Firefox to view local host. Type in clear and then type in firefox localhost. If you see the NGINX welcome page, then you're on the track. Close Firefox now. NGINX stores its main configuration file on /etc/nginx/nginx.conf It also has additional configuration files just like Apache at…

Contents