BYU-ITC-515R-ACT

Homework 8 – Web Servers

  1. Question: (True/False) NGINX can be used as both a web server and a reverse proxy server.
    • Answer: True
  2. Question: (True/False) Flask uses Jinja2 as its default templating engine.
    • Answer: True
  3. Question: (True/False) NGINX can serve static files directly without needing a separate application server.
    • Answer: True
  4. Question: (True/False) Flask routes can handle multiple HTTP methods like GET and POST.
    • Answer: True
  5. Question: (True/False) NGINX supports load balancing out of the box.
    • Answer: True
  6. Question: (True/False) NGINX can cache content to improve performance.
    • Answer: True
  7. Question: (True/False) Flask applications can use middleware for additional request processing.
    • Answer: True
  8. Question: (True/False) You need to restart NGINX every time you make changes to its configuration file.
    • Answer: True
  9. Question: (True/False) Flask can handle production traffic without any additional servers like NGINX.
    • Answer: True
  10. Question: (True/False) Port forwarding is necessary to allow external access to a Flask server running on a local machine.
    • Answer: True
  11. Question: (True/False) NGINX can be configured to handle SSL/TLS encryption for secure connections.
    • Answer: True
  12. Question: (True/False) NGINX can serve static files directly without passing the request to Flask.
    • Answer: True
  13. Question: What command is used to start a basic Flask server?
    • Answer: flask run, python3 server.py, python3 main.py
  14. Question: What is the default port for NGINX to serve HTTP traffic?
    • Answer: 80
  15. Question: What is the default port for NGINX to serve HTTPS traffic?
    • Answer: 443
  16. Question: Which configuration file is typically used to configure NGINX?
    • Answer: /etc/nginx/nginx.conf
  17. Question: What WSGI server is commonly used to deploy Flask applications in production?
    • Answer: Gunicorn
  18. Question: In NGINX, what directive is used to define a reverse proxy?
    • Answer: proxy_pass
  19. Question: How do you start the NGINX service on a Linux system? Assume you are not the root user.
    • Answer: sudo systemctl start nginx
  20. Question: How do you stop the NGINX service on a Linux system? Assume you are not the root user.
    • Answer: sudo systemctl stop nginx
  21. Question: What command reloads NGINX after configuration changes? Assume you are not the root user.
    • Answer: sudo systemctl reload nginx
  22. Question: What is the file extension for NGINX configuration files?
    • Answer: .conf
  23. Question: By default, on which port does Flask run?
    • Answer: 5000
  24. Question: Which NGINX directive specifies the SSL certificate file?
    • Answer: ssl_certificate
  25. Question: What command checks the syntax of the NGINX configuration file? Assume you are not the root user.
    • Answer: sudo nginx -t