Intern
Heeft u met Apache HTTP Server gewerkt?
sobes.tech AI
Antwoord van AI
Ja, ik heb gewerkt. Ik heb ervaring met het configureren, optimaliseren en ondersteunen van Apache HTTP Server in verschillende infrastructuren.
Belangrijkste werkgebieden:
- Installatie en basisconfiguratie:
- Compilatie uit broncode en installatie vanuit pakketten (
apt,yum). - Bewerken van het hoofdconfiguratiebestand
httpd.conf(ofapache2.conf). - Instellen van luisterpoorten (
Listen).
- Compilatie uit broncode en installatie vanuit pakketten (
- Virtuele hosts:
- Aanmaken en configureren van virtuele hosts voor meerdere sites op één server.
- Configuratie op basis van naam (
Name-based Virtual Hosts) en IP-adres (IP-based Virtual Hosts). - Gebruik van
ServerName,ServerAlias,DocumentRootdirectives.
- Apache modules:
- In- en uitschakelen van modules (bijvoorbeeld
mod_rewrite,mod_ssl,mod_proxy). - Configuratie van specifieke modules, zoals URL herschrijfregels (
mod_rewrite). - Werken met MPM (Multi-Processing Modules) —
prefork,worker,event.
- In- en uitschakelen van modules (bijvoorbeeld
- Beveiliging:
- SSL/TLS configuratie met
mod_sslen Let's Encrypt of andere certificaten. - Toegangsbeperking op IP (
Order,Deny,Allow). - Authenticatie instellen (
Basic,Digest) met.htaccessof configuratiebestanden. - Bescherming tegen veelvoorkomende aanvallen (bijvoorbeeld DDoS, SQL Injection - in combinatie met WAF).
- SSL/TLS configuratie met
- Prestaties en schaalbaarheid:
- Optimalisatie van MPM-instellingen (
MaxRequestWorkers,StartServers,MinSpareServers,MaxSpareServers). - Gebruik van caching (
mod_cache,mod_disk_cache). - Integratie met FastCGI (PHP-FPM) en proxying van verzoeken (
mod_proxy,mod_proxy_http,mod_proxy_fcgi). - Compressie configureren (
mod_deflate).
- Optimalisatie van MPM-instellingen (
- Logging en monitoring:
- Logformaten voor toegangslogboeken instellen (
LogFormat,CustomLog). - Foutenlogboeken analyseren (
ErrorLog). - Integratie met monitoring systemen (bijvoorbeeld Prometheus Exporter, Nagios plugins).
- Gebruik van
mod_statusvoor serverstatus en verzoekmonitoring.
- Logformaten voor toegangslogboeken instellen (
- Automatisering en implementatie:
- Ansible playbooks schrijven voor installatie en configuratie van Apache.
- Gebruik van Docker containers met Apache.
Voorbeeld van een virtuele host configuratie:
# Voorbeeld van een virtuele host configuratie
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/example.com/public_html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/example.com/public_html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
# Redirect naar HTTPS
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
</VirtualHost>
<VirtualHost *:443>
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/example.com/public_html
ErrorLog ${APACHE_LOG_DIR}/ssl_error.log
CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined
<Directory /var/www/example.com/public_html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
SSLEngine on
SSLCertificateFile /etc/ssl/certs/example.com.crt
SSLCertificateKeyFile /etc/ssl/private/example.com.key
SSLCertificateChainFile /etc/ssl/certs/example.com.ca-bundle # Indien aanwezig
# Aanbevolen SSL beveiligingsinstellingen
SSLProtocol all -SSLv2 -SSLv3
SSLCipherSuite ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA
SSLHonorCipherOrder on
SSLSessionTickets off
SSLCompression off
</VirtualHost>
Ervaring met Nginx is ook aanwezig, waardoor het mogelijk is om de beste oplossing voor een specifieke taak te kiezen of ze te integreren (bijvoorbeeld Apache als backend achter Nginx).