


























































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Focused on the installation, configuration, and administration of the Apache HTTP server, this exam tests the candidate's ability to configure virtual hosts, manage web services, and optimize server performance. It is ideal for those managing web servers in a production environment.
Typology: Exams
1 / 66
This page cannot be seen from the preview
Don't miss anything!



























































Question 1. Which directive specifies the top-level directory where Apache configuration files are stored? A) ServerRoot B) DocumentRoot C) ServerName D) Listen Answer: A Explanation: The ServerRoot directive tells Apache where to find its main configuration files. Question 2. What is the main purpose of the Apache HTTP Server? A) Serve web content using the HTTP protocol B) Manage email delivery C) Provide DNS resolution D) Monitor network bandwidth Answer: A Explanation: Apache HTTP Server is designed to serve web content via the HTTP protocol. Question 3. Which of the following best describes Apache’s modular architecture? A) Core features only B) Features are compiled into the core C) Features can be enabled or disabled as modules D) Only supports fixed features Answer: C Explanation: Apache uses loadable modules, allowing features to be enabled or disabled easily.
Question 4. How do you start the Apache service on most Linux systems using systemd? A) apachectl start B) apache2ctl run C) systemctl start apache D) service begin apache Answer: C Explanation: The correct command for systemd-based systems is systemctl start apache2. Question 5. What is the default configuration file for Apache on most installations? A) apache.conf B) server.conf C) httpd.conf D) apache2.conf Answer: C Explanation: httpd.conf is the traditional main configuration file for Apache. Question 6. Which directive defines the main directory from which Apache serves files? A) DocumentRoot B) ServerRoot C) DirectoryIndex D) Alias Answer: A Explanation: DocumentRoot sets the default directory for website files. Question 7. Which command checks Apache's configuration syntax for errors?
A) User B) Group C) ServerAdmin D) Owner Answer: A Explanation: The User directive sets the system user for Apache processes. Question 11. What is the purpose of the ServerName directive? A) Defines the server's hostname for HTTP requests B) Specifies the Apache admin email C) Points to the DocumentRoot D) Sets the log file location Answer: A Explanation: ServerName sets the hostname that Apache uses for identifying itself in requests. Question 12. Which command enables an Apache module on Debian-based systems? A) a2enmod B) mod_enable C) apachectl enable D) enablemod Answer: A Explanation: a2enmod is the utility for enabling modules in Debian-based Apache installations. Question 13. What is the main function of the .htaccess file? A) Provide directory-level configuration overrides
B) Store SSL certificates C) Manage PHP settings D) Log server errors Answer: A Explanation: .htaccess allows per-directory configuration, often for URL rewrites and access control. Question 14. Which Apache directive allows CGI script execution in a directory? A) Options +ExecCGI B) AllowCGI Yes C) EnableScripts On D) CGIEnable Answer: A Explanation: Options +ExecCGI enables CGI script execution in the specified directory. Question 15. What does the DirectoryIndex directive do? A) Specifies default file(s) served for a directory request B) Sets directory permissions C) Creates an alias D) Configures logging Answer: A Explanation: DirectoryIndex defines which file Apache serves when a directory is requested. Question 16. Which section is used to configure access to a specific filesystem path? A) <Directory> B) <Location>
D) Define log formats Answer: A Explanation: Require is used for access control in the Apache configuration. Question 20. Which command disables an Apache module on Debian-based systems? A) a2dismod B) module_disable C) apachectl disable D) disablemod Answer: A Explanation: a2dismod disables a specific module in Debian-based environments. Question 21. Which container is used to match URLs rather than filesystem paths? A) <Location> B) <Directory> C) <Files> D) <IfModule> Answer: A Explanation: <Location> matches request URLs, not filesystem paths. Question 22. What does the AllowOverride directive control? A) What directives .htaccess can override B) Default index files C) Log file rotation D) SSL protocols
Answer: A Explanation: AllowOverride specifies which directives can be overridden in .htaccess files. Question 23. Which log records all requests processed by Apache? A) Access Log B) Error Log C) SSL Log D) Rewrite Log Answer: A Explanation: The Access Log contains details of each request handled by Apache. Question 24. Which command reloads Apache’s configuration without dropping connections? A) systemctl reload apache B) apachectl restart C) apache2ctl stop D) systemctl reset apache Answer: A Explanation: systemctl reload allows Apache to re-read configuration files gracefully. Question 25. What is stored in the .htpasswd file? A) Usernames and encrypted passwords for Basic Authentication B) Apache’s configuration C) SSL certificates D) Database connections Answer: A
Question 29. Which directive specifies the location of the SSL certificate file? A) SSLCertificateFile B) SSLCertificateKeyFile C) SSLEngine D) SSLVerifyClient Answer: A Explanation: SSLCertificateFile points to the public certificate file. Question 30. Which is a strong reason for disabling directory indexes? A) Prevent information disclosure B) Improve server speed C) Enable PHP scripts D) Allow access to all files Answer: A Explanation: Directory indexes can expose files and structure, leading to information leaks. Question 31. Which module is commonly used for web application firewall (WAF) in Apache? A) mod_security B) mod_proxy C) mod_deflate D) mod_ssl Answer: A Explanation: mod_security provides WAF capabilities to protect applications.
Question 32. What is the purpose of the a2ensite command? A) Enable a site configuration B) Enable a module C) Start the Apache service D) Enable SSL Answer: A Explanation: a2ensite enables a specific site configuration in Apache. Question 33. Which directive lets you define custom log file formats? A) LogFormat B) ErrorLogFormat C) CustomLog D) LogOutput Answer: A Explanation: LogFormat allows you to define new access log formats. Question 34. What does the KeepAlive directive control? A) Reuse of connections for multiple requests B) Directory permissions C) SSL session timeout D) Error log verbosity Answer: A Explanation: KeepAlive controls whether persistent connections are allowed.
Question 38. Which module enables Gzip compression in Apache? A) mod_deflate B) mod_gzip C) mod_compress D) mod_security Answer: A Explanation: mod_deflate is the standard module for Gzip compression. Question 39. What is the purpose of the mod_status module? A) Provides real-time server status information B) Handles SSL connections C) Manages CGI scripts D) Configures logging Answer: A Explanation: mod_status provides an information page about server activity. Question 40. Which error code indicates "Forbidden" access? A) 403 B) 404 C) 500 D) 200 Answer: A Explanation: HTTP 403 means the client does not have permission to access the resource. Question 41. Which directive sets the location of the error log file?
A) ErrorLog B) LogError C) ErrorLogFile D) LogFile Answer: A Explanation: ErrorLog specifies the path to the error log file. Question 42. Which command shows all enabled modules in Apache? A) apachectl - M B) apachectl - L C) httpd - V D) a2enmod --list Answer: A Explanation: apachectl - M lists all loaded Apache modules. Question 43. What does the RewriteCond directive do in mod_rewrite? A) Sets a condition for a RewriteRule B) Defines a rewrite rule C) Enables URL redirection D) Logs rewrite actions Answer: A Explanation: RewriteCond defines conditions that must be met for a RewriteRule to apply. Question 44. Which file is used for log rotation configuration on most Linux systems? A) /etc/logrotate.conf
C) SSLKey D) SSLEngine Answer: A Explanation: SSLCertificateKeyFile points to the private key for SSL/TLS. Question 48. What does the <Files> container do? A) Applies configuration to specific files B) Matches URLs C) Sets file permissions D) Creates virtual hosts Answer: A Explanation: <Files> applies configuration to files matching a pattern. Question 49. What is the main advantage of using FastCGI with Apache? A) Improved performance for dynamic content B) Easier configuration C) Uses less disk space D) Disables CGI Answer: A Explanation: FastCGI keeps scripts running between requests, improving performance. Question 50. What does the ServerAlias directive do? A) Defines alternate names for a virtual host B) Sets the admin email C) Specifies the document root
D) Enables SSL Answer: A Explanation: ServerAlias allows a virtual host to respond to multiple domain names. Question 51. Which module provides support for PHP in Apache? A) mod_php B) mod_perl C) mod_python D) mod_ssl Answer: A Explanation: mod_php embeds the PHP interpreter into the Apache process. Question 52. What is the main role of the mod_proxy_balancer module? A) Load balancing between backend servers B) Logging proxy requests C) Compressing responses D) Managing SSL Answer: A Explanation: mod_proxy_balancer enables load balancing of proxied requests. Question 53. Which Apache directive is used to limit the number of simultaneous requests? A) MaxRequestWorkers B) MaxClients C) MaxConnections D) MaxRequests
Explanation: 200 is the standard code for a successful HTTP request. Question 57. Which file contains the main configuration for Apache on Red Hat-based systems? A) /etc/httpd/conf/httpd.conf B) /etc/apache2/httpd.conf C) /etc/httpd/sites-available/default.conf D) /etc/conf/httpd.conf Answer: A Explanation: On Red Hat-based systems, /etc/httpd/conf/httpd.conf is the main config file. Question 58. How can you test the syntax of Apache configuration without starting the server? A) apachectl configtest B) apachectl start C) httpd - run D) systemctl reload apache Answer: A Explanation: apachectl configtest checks syntax only. Question 59. Which MPM is best suited for compatibility with non-thread-safe libraries? A) prefork B) worker C) event D) threaded Answer: A Explanation: prefork uses separate processes, ensuring compatibility with non-thread-safe code.
Question 60. What does the Options Indexes directive do? A) Enables directory listing B) Disables SSL C) Redirects URLs D) Loads modules Answer: A Explanation: Options Indexes allows Apache to generate a directory index if no index file is present. Question 61. Which is a benefit of running Apache as a non-root user? A) Improved security B) Faster performance C) SSL support D) More log file space Answer: A Explanation: Running as a non-root user limits potential damage from exploits. Question 62. Which directive is used to specify additional configuration files to include? A) Include B) AddConfig C) LoadModule D) Import Answer: A Explanation: Include lets you add other configuration files into the main config.