sattelfest/deploy/apache-sattelfest.conf
2026-05-30 00:09:33 +02:00

43 lines
1.4 KiB
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Apache-Vorlage Alternative zur Caddyfile.
# Ablegen als: /etc/apache2/sites-available/sattelfest.conf
# Aktivieren: sudo a2ensite sattelfest && sudo systemctl reload apache2
#
# HTTPS fügt certbot automatisch hinzu (siehe Anleitung) hier stehen
# zunächst nur die HTTP-(Port-80-)VirtualHosts.
# --- Statische Website ---------------------------------------------------
<VirtualHost *:80>
ServerName www.sattelfest.org
DocumentRoot /srv/sattelfest/dist
<Directory /srv/sattelfest/dist>
Require all granted
Options -Indexes
AllowOverride None
</Directory>
# Fotos lange im Browser-Cache halten
<LocationMatch "^/photos/">
Header set Cache-Control "public, max-age=2592000"
</LocationMatch>
# Komprimierung
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/css application/javascript application/json image/svg+xml
</IfModule>
</VirtualHost>
# --- Ohne "www" auf "www" weiterleiten -----------------------------------
<VirtualHost *:80>
ServerName sattelfest.org
Redirect permanent / https://www.sattelfest.org/
</VirtualHost>
# --- Git-Host (Forgejo) Reverse Proxy ----------------------------------
<VirtualHost *:80>
ServerName git.sattelfest.org
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
</VirtualHost>