Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

75 Zeilen
2.9KB

  1. # default Apache site config for Pleroma
  2. #
  3. # needed modules: define headers proxy proxy_http proxy_wstunnel rewrite ssl
  4. # optional modules: cache cache_disk
  5. #
  6. # Simple installation instructions:
  7. # 1. Install your TLS certificate, possibly using Let's Encrypt.
  8. # 2. Replace 'example.tld' with your instance's domain wherever it appears.
  9. # 3. This assumes a Debian style Apache config. Copy this file to
  10. # /etc/apache2/sites-available/ and then add a symlink to it in
  11. # /etc/apache2/sites-enabled/ by running 'a2ensite pleroma-apache.conf', then restart Apache.
  12. #
  13. # Optional: enable disk-based caching for the media proxy
  14. # For details, see https://git.pleroma.social/pleroma/pleroma/wikis/How%20to%20activate%20mediaproxy
  15. #
  16. # 1. Create the directory listed below as the CacheRoot, and make sure
  17. # the Apache user can write to it.
  18. # 2. Configure Apache's htcacheclean to clean the directory periodically.
  19. # 3. Run 'a2enmod cache cache_disk' and restart Apache.
  20. Define servername example.tld
  21. ServerName ${servername}
  22. ServerTokens Prod
  23. ErrorLog ${APACHE_LOG_DIR}/error.log
  24. CustomLog ${APACHE_LOG_DIR}/access.log combined
  25. <VirtualHost *:80>
  26. Redirect permanent / https://${servername}
  27. </VirtualHost>
  28. <VirtualHost *:443>
  29. SSLEngine on
  30. SSLCertificateFile /etc/letsencrypt/live/${servername}/cert.pem
  31. SSLCertificateKeyFile /etc/letsencrypt/live/${servername}/privkey.pem
  32. SSLCertificateChainFile /etc/letsencrypt/live/${servername}/fullchain.pem
  33. # Mozilla modern configuration, tweak to your needs
  34. SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
  35. SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256
  36. SSLHonorCipherOrder on
  37. SSLCompression off
  38. SSLSessionTickets off
  39. # uncomment the following to enable mediaproxy caching on disk
  40. # <IfModule mod_cache_disk.c>
  41. # CacheRoot /var/cache/apache2/mod_cache_disk
  42. # CacheDirLevels 1
  43. # CacheDirLength 2
  44. # CacheEnable disk /proxy
  45. # CacheLock on
  46. # </IfModule>
  47. RewriteEngine On
  48. RewriteCond %{HTTP:Connection} Upgrade [NC]
  49. RewriteCond %{HTTP:Upgrade} websocket [NC]
  50. RewriteRule /(.*) ws://localhost:4000/$1 [P,L]
  51. ProxyRequests off
  52. # this is explicitly IPv4 since Pleroma.Web.Endpoint binds on IPv4 only
  53. # and `localhost.` resolves to [::0] on some systems: see issue #930
  54. ProxyPass / http://127.0.0.1:4000/
  55. ProxyPassReverse / http://127.0.0.1:4000/
  56. RequestHeader set Host ${servername}
  57. ProxyPreserveHost On
  58. </VirtualHost>
  59. # OCSP Stapling, only in httpd 2.3.3 and later
  60. SSLUseStapling on
  61. SSLStaplingResponderTimeout 5
  62. SSLStaplingReturnResponderErrors off
  63. SSLStaplingCache shmcb:/var/run/ocsp(128000)