Files
trainingstagebuch/apache-http.conf.example
Torsten Schulz (local) 945fd85e39 Update Apache configuration example to clarify structure and enhance redirect handling
This commit revises the apache.conf.example file to provide clearer documentation on the configuration structure, emphasizing the separation of HTTP and HTTPS settings. It adds detailed comments regarding the use of separate configuration files for HTTP and HTTPS, and enhances the redirect rules for both www and non-www domains, ensuring proper traffic management and SEO practices.
2025-11-16 12:14:17 +01:00

23 lines
690 B
Plaintext

# Apache-Konfiguration für tt-tagebuch.de - HTTP (Port 80)
#
# Diese Datei kopieren nach: /etc/apache2/sites-available/tt-tagebuch.de.conf
# Dann aktivieren mit: sudo a2ensite tt-tagebuch.de.conf
# Und neu starten: sudo systemctl restart apache2
#
# WICHTIG: Folgende Module müssen aktiviert sein:
# sudo a2enmod rewrite
# sudo systemctl restart apache2
# HTTP: www.tt-tagebuch.de -> HTTPS: tt-tagebuch.de
<VirtualHost *:80>
ServerName www.tt-tagebuch.de
Redirect permanent / https://tt-tagebuch.de/
</VirtualHost>
# HTTP: tt-tagebuch.de -> HTTPS: tt-tagebuch.de
<VirtualHost *:80>
ServerName tt-tagebuch.de
Redirect permanent / https://tt-tagebuch.de/
</VirtualHost>