Apache2 TLS: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
| Zeile 33: | Zeile 33: | ||
;Wir machen eine Webseite gleich mit einem Redirect von http auf https | ;Wir machen eine Webseite gleich mit einem Redirect von http auf https | ||
*vi /etc | *vi /etc | ||
| + | <pre> | ||
| + | <VirtualHost *:80> | ||
| + | Redirect permanent / https://dnsgw.int/ | ||
| + | </VirtualHost> | ||
| + | |||
| + | <VirtualHost *:443> | ||
| + | SSLEngine on | ||
| + | SSLCertificateFile /etc/ssl/own.crt | ||
| + | SSLCertificateKeyFile /etc/ssl/own.key | ||
| + | |||
| + | DocumentRoot /var/www/html | ||
| + | <Directory /var/www/html> | ||
| + | AllowOverride None | ||
| + | Require all granted | ||
| + | </Directory> | ||
| + | </VirtualHost> | ||
| + | </pre> | ||
Version vom 3. Juni 2026, 14:09 Uhr
Netzkonfiguration WWW-Server (DMZ)
| Parameter | Wert | Erläuterung |
|---|---|---|
| Netzwerk (NIC) | DMZ | Interface-Zuweisung in VirtualBox |
| IP | 10.88.2XX.11 | Statische IP |
| CIDR | 24 | Classless Inter-Domain Routing Präfixlänge |
| GW | 10.88.2XX.1 | GATEWAY |
| NS | 10.88.2XX.21 | Resolver |
| FQDN | www.it2XX.int | Fully Qualified Domain Name |
| SHORT | www | Short Name |
| DOM | it2XX.int | Domain Name |
- Anpassen des Templates
oder
- debian-setup.sh -f www.it2XX.int -a 10.88.2XX.11/24 -g 10.88.2XX.1 -n 192.168.HS.88
Auf der Maschine
- Installation von apache2
- apt install -y apache2
- Aktiveren von ssl
- a2enmod ssl
- systemctl restart apache2
Konfiguration
- Wir machen eine Webseite gleich mit einem Redirect von http auf https
- vi /etc
<VirtualHost *:80>
Redirect permanent / https://dnsgw.int/
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/ssl/own.crt
SSLCertificateKeyFile /etc/ssl/own.key
DocumentRoot /var/www/html
<Directory /var/www/html>
AllowOverride None
Require all granted
</Directory>
</VirtualHost>