43 lines
1.4 KiB
Text
43 lines
1.4 KiB
Text
# 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>
|