Fork of Pleroma with site-specific changes and feature branches https://git.pleroma.social/pleroma/pleroma
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.

55 lines
2.0KB

  1. # default Apache site config for Pleroma
  2. #
  3. # needed modules: define headers proxy proxy_http proxy_wstunnel rewrite ssl
  4. #
  5. # Simple installation instructions:
  6. # 1. Install your TLS certificate, possibly using Let's Encrypt.
  7. # 2. Replace 'example.tld' with your instance's domain wherever it appears.
  8. # 3. This assumes a Debian style Apache config. Copy this file to
  9. # /etc/apache2/sites-available/ and then add a symlink to it in
  10. # /etc/apache2/sites-enabled/ by running 'a2ensite pleroma-apache.conf', then restart Apache.
  11. Define servername example.tld
  12. ServerName ${servername}
  13. ServerTokens Prod
  14. ErrorLog ${APACHE_LOG_DIR}/error.log
  15. CustomLog ${APACHE_LOG_DIR}/access.log combined
  16. <VirtualHost *:80>
  17. Redirect permanent / https://${servername}
  18. </VirtualHost>
  19. <VirtualHost *:443>
  20. SSLEngine on
  21. SSLCertificateFile /etc/letsencrypt/live/${servername}/cert.pem
  22. SSLCertificateKeyFile /etc/letsencrypt/live/${servername}/privkey.pem
  23. SSLCertificateChainFile /etc/letsencrypt/live/${servername}/fullchain.pem
  24. # Mozilla modern configuration, tweak to your needs
  25. SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
  26. 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
  27. SSLHonorCipherOrder on
  28. SSLCompression off
  29. SSLSessionTickets off
  30. RewriteEngine On
  31. RewriteCond %{HTTP:Connection} Upgrade [NC]
  32. RewriteCond %{HTTP:Upgrade} websocket [NC]
  33. RewriteRule /(.*) ws://localhost:4000/$1 [P,L]
  34. ProxyRequests off
  35. ProxyPass / http://localhost:4000/
  36. ProxyPassReverse / http://localhost:4000/
  37. RequestHeader set Host ${servername}
  38. ProxyPreserveHost On
  39. </VirtualHost>
  40. # OCSP Stapling, only in httpd 2.3.3 and later
  41. SSLUseStapling on
  42. SSLStaplingResponderTimeout 5
  43. SSLStaplingReturnResponderErrors off
  44. SSLStaplingCache shmcb:/var/run/ocsp(128000)