课程: Linux System Engineer: Web Servers and DNS Using Apache, NGINX, and BIND

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Create a server block with NGINX

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…

内容