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.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. LogLevel warn
  11. ErrorLog /var/log/apache2/mastodon.info-error_log
  12. CustomLog /var/log/apache2/mastodon.info-access_log common
  13. Header always set Referrer-Policy "strict-origin-when-cross-origin"
  14. Header always set Strict-Transport-Security "max-age=31536000"
  15. <LocationMatch "^/(assets|avatars|emoji|headers|packs|sounds|system)>
  16. Header always set Cache-Control "public, max-age=31536000, immutable"
  17. Require all granted
  18. </LocationMatch>
  19. ProxyPreserveHost On
  20. RequestHeader set X-Forwarded-Proto "https"
  21. ProxyPass /500.html !
  22. ProxyPass /sw.js !
  23. ProxyPass /robots.txt !
  24. ProxyPass /manifest.json !
  25. ProxyPass /browserconfig.xml !
  26. ProxyPass /mask-icon.svg !
  27. ProxyPassMatch ^(/.*\.(png|ico)$) !
  28. ProxyPassMatch ^/(assets|avatars|emoji|headers|packs|sounds|system|.well-known/acme-challenge) !
  29. ProxyPass /api/v1/streaming/ ws://localhost:4210/
  30. ProxyPassReverse /api/v1/streaming/ ws://localhost:4210/
  31. ProxyPass / http://localhost:4220/
  32. ProxyPassReverse / http://localhost:4220/
  33. ErrorDocument 500 /500.html
  34. ErrorDocument 501 /500.html
  35. ErrorDocument 502 /500.html
  36. ErrorDocument 503 /500.html
  37. ErrorDocument 504 /500.html
  38. </VirtualHost>