200-901 · Question #241
200-901 Question #241: Real Exam Question with Answer & Explanation
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. {"question_number": 7, "question": "A Bash script installs nginx, moves to /opt/nginx, and reads sites.txt. Which process is automated inside the loop?", "correct_answer": "B - Creating a file per each line in sites.txt from template.conf, then creating a symlink to enable it", "
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?
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
Explanation
{"question_number": 7, "question": "A Bash script installs nginx, moves to /opt/nginx, and reads sites.txt. Which process is automated inside the loop?", "correct_answer": "B - Creating a file per each line in sites.txt from template.conf, then creating a symlink to enable it", "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.", "generated_by": "claude-sonnet", "llm_judge_score": 4}
Topics
Community Discussion
No community discussion yet for this question.