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