LCA Web Server & Database Administration 4 — Questions and Answers
Question 1: Which Apache module provides SSL/TLS support for HTTPS connections?
- mod_tls
- mod_ssl (Correct answer)
- mod_https
- mod_secure
Correct answer: mod_ssl
mod_ssl is the Apache module that implements SSL/TLS using the OpenSSL library to enable HTTPS connections.
Question 2: What does the MySQL EXPLAIN statement reveal?
- The table schema and column definitions
- The query execution plan chosen by the optimizer (Correct answer)
- Currently running transactions and locks
- User privileges for a given query
Correct answer: The query execution plan chosen by the optimizer
EXPLAIN shows how MySQL's query optimizer plans to execute a SELECT statement, including index usage and row estimates.
Question 3: In PostgreSQL, what does VACUUM do?
- Compresses the database files to save disk space
- Reclaims storage occupied by dead tuples and updates visibility maps (Correct answer)
- Drops all temporary tables from the session
- Rebuilds all indexes in the database
Correct answer: Reclaims storage occupied by dead tuples and updates visibility maps
VACUUM reclaims space from rows deleted or updated (dead tuples) and updates the visibility map to help autovacuum and query planning.
Question 4: Which Nginx directive sets the maximum allowed size of the client request body?
- client_max_body_size (Correct answer)
- request_body_limit
- max_upload_size
- body_size_limit
Correct answer: client_max_body_size
client_max_body_size limits the size of the request body; exceeding it returns a 413 Request Entity Too Large error.
Question 5: What is the purpose of Apache's mod_proxy_fcgi module?
- Proxies WebSocket connections to backend servers
- Forwards requests to FastCGI backends such as PHP-FPM (Correct answer)
- Provides load balancing across multiple Apache instances
- Caches FastCGI responses on disk
Correct answer: Forwards requests to FastCGI backends such as PHP-FPM
mod_proxy_fcgi allows Apache to forward requests to FastCGI applications (like PHP-FPM) using the FastCGI protocol.
Question 6: Which command in MySQL shows all currently running queries and their status?
- SHOW STATUS LIKE 'Threads%'
- SHOW FULL PROCESSLIST (Correct answer)
- SELECT * FROM information_schema.QUERIES
- SHOW ACTIVE CONNECTIONS
Correct answer: SHOW FULL PROCESSLIST
SHOW FULL PROCESSLIST displays all active threads in the MySQL server including query text, state, and execution time.
Question 7: In Nginx, which directive configures the path to the error log and its severity level?
- log_format error /var/log/nginx/error.log warn
- access_log /var/log/nginx/error.log error
- error_log /var/log/nginx/error.log warn (Correct answer)
- log_error /var/log/nginx/error.log level=warn
Correct answer: error_log /var/log/nginx/error.log warn
The error_log directive sets the file path and minimum severity level (debug, info, notice, warn, error, crit, alert, emerg) for Nginx error logging.
Which Apache module provides SSL/TLS support for HTTPS connections?