nerdexam
Cisco

200-901 · Question #241

Refer to the exhibit. An engineer must configure a load balancer server. The engineer prepares a script to automate workflow by using Bash. The script installs the nginx package, moves to the…

The correct answer is B. creating a file per each line in sites.txt with the information in template.conf, creating a link for the. Nginx uses a sites-available / sites-enabled pattern for virtual host management. For each site name listed in sites.txt, the loop: (1) copies or instantiates the template.conf file to create a site-specific configuration file (typically in /etc/nginx/sites-available), and (2)…

Infrastructure and Automation

Question

Refer to the exhibit. An engineer must configure a load balancer server. The engineer prepares a script to automate workflow by using Bash. The script installs the nginx package, moves to the /opt/nginx directory, and reads the sites.txt file for further processing. Based on the script workflow, which process is being automated within the loop by using the information in sites.txt?

Exhibit

200-901 question #241 exhibit

Options

  • Acreating a new file based on template.conf in the /etc/nginx/sites_enabled directory for each line
  • Bcreating a file per each line in sites.txt with the information in template.conf, creating a link for the
  • Cusing the content of the file to create the template.conf file, creating a link from the created file to
  • Dusing the information in the file to create a set of empty files in the /etc/nginx/sites_enabled

How the community answered

(22 responses)
  • A
    5% (1)
  • B
    73% (16)
  • C
    9% (2)
  • D
    14% (3)

Explanation

Nginx uses a sites-available / sites-enabled pattern for virtual host management. For each site name listed in sites.txt, the loop: (1) copies or instantiates the template.conf file to create a site-specific configuration file (typically in /etc/nginx/sites-available), and (2) creates a symbolic link from /etc/nginx/sites-enabled pointing to that new config file, which activates the site. This two-step process - create config from template, then symlink to enable - is the standard nginx configuration pattern and matches option B. Options A, C, and D each describe only part of this workflow or describe it inaccurately.

Topics

#Nginx Configuration#Bash Scripting#Automation#Server Configuration

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice