No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

etc_apache2_sites-available_mastodon.j2 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <VirtualHost *:80>
  2. ServerName {{ mastodon_subdomain }}.{{ item.name }}
  3. Redirect temp / https://{{ mastodon_subdomain }}.{{ item.name }}/
  4. </VirtualHost>
  5. <VirtualHost *:443>
  6. ServerName {{ mastodon_subdomain }}.{{ item.name }}
  7. SSLEngine On
  8. DocumentRoot "/home/mastodon/mastodon/public"
  9. Alias "/system" "/data/mastodon/public-system"
  10. Header always set Referrer-Policy "strict-origin-when-cross-origin"
  11. Header always set Strict-Transport-Security "max-age=31536000"
  12. <LocationMatch "^/(assets|avatars|emoji|headers|packs|sounds|system)>
  13. Header always set Cache-Control "public, max-age=31536000, immutable"
  14. Require all granted
  15. </LocationMatch>
  16. ProxyPreserveHost On
  17. RequestHeader set X-Forwarded-Proto "https"
  18. ProxyPass /500.html !
  19. ProxyPass /sw.js !
  20. ProxyPass /robots.txt !
  21. ProxyPass /manifest.json !
  22. ProxyPass /browserconfig.xml !
  23. ProxyPass /mask-icon.svg !
  24. ProxyPassMatch ^(/.*\.(png|ico)$) !
  25. ProxyPassMatch ^/(assets|avatars|emoji|headers|packs|sounds|system|.well-known/acme-challenge) !
  26. ProxyPass /api/v1/streaming/ ws://localhost:4210/
  27. ProxyPassReverse /api/v1/streaming/ ws://localhost:4210/
  28. ProxyPass / http://localhost:4220/
  29. ProxyPassReverse / http://localhost:4220/
  30. ErrorDocument 500 /500.html
  31. ErrorDocument 501 /500.html
  32. ErrorDocument 502 /500.html
  33. ErrorDocument 503 /500.html
  34. ErrorDocument 504 /500.html
  35. </VirtualHost>