Apache Web Server Configuration Flashcards

(25 cards)

1
Q

What is Apache in the LAMP stack?

A

Apache is the web server software that serves HTTP requests for PHP and WordPress applications.

Apache processes requests to deliver WordPress pages or PHP scripts in a LAMP environment. Freelancers configure Apache for client sites, while enterprise architects optimize it for high-traffic systems, aligning with your LAMP stack goals.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the main Apache configuration file?

A

The main configuration file is httpd.conf, typically located in /etc/apache2 or /etc/httpd.

It defines global Apache settings. In WordPress, httpd.conf sets up the server for site hosting. Freelancers edit it for basic setups, while enterprise architects manage it for multi-site environments.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the .htaccess file in Apache?

A

The .htaccess file is a per-directory configuration file for Apache settings, like rewrites.

In WordPress, .htaccess enables permalinks. Freelancers configure it for client sites, while enterprise architects secure and optimize it, as seen in your WordPress Security deck.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a virtual host in Apache?

A

A virtual host allows multiple websites on one server, defined in <VirtualHost> blocks.</VirtualHost>

For WordPress, virtual hosts separate client sites (e.g., example.com). Freelancers set up virtual hosts, while enterprise architects configure them for load-balanced environments.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you define a virtual host in Apache?

A

Use <VirtualHost *:80>, like <VirtualHost *:80> ServerName example.com DocumentRoot /var/www/html </VirtualHost>.

Specifies site details. Freelancers configure WordPress hosts, while enterprise architects automate virtual host setups for scalability.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the DocumentRoot directive in Apache?

A

DocumentRoot specifies the directory for website files, like DocumentRoot /var/www/html.

Points to WordPress’s root folder. Freelancers set it for client sites, while enterprise architects ensure secure, standardized paths.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the ServerName directive in Apache?

A

ServerName sets the domain name, like ServerName example.com.

Identifies a virtual host for WordPress. Freelancers configure domains, while enterprise architects manage multiple domains for enterprise systems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the AllowOverride directive?

A

AllowOverride controls whether .htaccess files can override settings, like AllowOverride All.

Enables WordPress permalinks. Freelancers enable it for flexibility, while enterprise architects limit it for security, per your security interests.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is mod_rewrite in Apache?

A

mod_rewrite enables URL rewriting, used for clean URLs like RewriteRule ^post/([0-9]+)$ index.php?p=$1.

Critical for WordPress permalinks. Freelancers configure rewrites, while enterprise architects optimize rules for performance.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you enable mod_rewrite in Apache?

A

Use a2enmod rewrite and restart Apache with sudo service apache2 restart.

Activates URL rewriting for WordPress. Freelancers enable it on Ubuntu servers, while enterprise architects automate module activation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the RewriteEngine directive?

A

RewriteEngine On enables the rewrite engine for URL rules.

Used in .htaccess for WordPress permalinks. Freelancers add it for clean URLs, while enterprise architects ensure efficient rewrite processing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the Directory directive in Apache?

A

The Directory directive sets permissions for a directory, like <Directory /var/www/html> AllowOverride All </Directory>.

Configures WordPress directory access. Freelancers secure directories, while enterprise architects enforce strict permissions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is mod_ssl in Apache?

A

mod_ssl enables SSL/TLS for secure HTTPS connections.

Secures WordPress with HTTPS. Freelancers enable SSL for clients, while enterprise architects configure it for compliance, as in your security deck.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How do you enable HTTPS in Apache?

A

Enable mod_ssl, configure a virtual host with SSLEngine on, and specify certificate paths.

Uses Let’s Encrypt for WordPress. Freelancers set up SSL, while enterprise architects automate certificate renewals.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is mod_security in Apache?

A

mod_security is a web application firewall for protecting Apache servers.

Blocks attacks on WordPress sites. Freelancers enable it for client security, while enterprise architects customize rules for robust protection.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the SSLCertificateFile directive?

A

SSLCertificateFile specifies the SSL certificate, like SSLCertificateFile /etc/ssl/certs/cert.pem.

Enables HTTPS for WordPress. Freelancers configure certificates, while enterprise architects manage certificate chains for enterprise systems.

17
Q

What is the ServerTokens directive?

A

ServerTokens controls server version disclosure, like ServerTokens Prod.

Hides Apache version for security. Freelancers minimize exposure, while enterprise architects enforce it to reduce attack surfaces, per your security deck.

18
Q

What is the ServerSignature directive?

A

ServerSignature Off disables server information in error pages.

Enhances WordPress security by hiding details. Freelancers disable it for clients, while enterprise architects ensure minimal information leakage.

19
Q

What is the KeepAlive directive?

A

KeepAlive On allows persistent connections to reduce latency.

Improves WordPress performance. Freelancers enable it for speed, while enterprise architects optimize connection limits, as in your performance deck.

20
Q

What is the MaxKeepAliveRequests directive?

A

MaxKeepAliveRequests sets the maximum requests per connection, like MaxKeepAliveRequests 100.

Balances WordPress performance and resources. Freelancers tune it, while enterprise architects adjust it for high-traffic systems.

20
Q

What is the ErrorLog directive?

A

ErrorLog specifies the error log file, like ErrorLog /var/log/apache2/error.log.

Logs WordPress server errors. Freelancers monitor logs, while enterprise architects integrate them with monitoring tools, per your debugging deck.

21
Q

What is the CustomLog directive?

A

CustomLog defines access log settings, like CustomLog /var/log/apache2/access.log combined.

Tracks WordPress site visits. Freelancers analyze logs, while enterprise architects use them for traffic analysis.

22
Q

What is the a2enmod command?

A

a2enmod enables Apache modules, like sudo a2enmod ssl.

Activates features for WordPress (e.g., SSL, rewrite). Freelancers enable modules, while enterprise architects automate module management.

22
Q

What is the a2ensite command?

A

a2ensite enables a virtual host, like sudo a2ensite example.com.

Activates WordPress sites. Freelancers enable hosts, while enterprise architects script site activation for multi-site setups.

23
How do you restart Apache in Linux?
Use sudo service apache2 restart or sudo systemctl restart apache2. Applies configuration changes for WordPress. Freelancers restart after edits, while enterprise architects automate restarts with minimal downtime, supporting your Linux basics deck.