Pequeños códigos de cosas que siempre son necesarias tener a mano...
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.

pleroma.conf 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Congiración de Apache para Pleroma
  2. #
  3. # módulos necesarios: define headers proxy proxy_http proxy_wstunnel rewrite ssl
  4. #
  5. # Instrucciones de instalación simplicada:
  6. # 1. Instala tu certificado TLS. Una buena opción es usar Let's Encrypt.
  7. # 2. Cambia 'example.tld' por el DNS de tu instancia.
  8. # 3. Copia este archivo a
  9. # /etc/apache2/sites-available/ y luego genera un enlace simbólico a
  10. # /etc/apache2/sites-enabled/ ejecutando 'a2ensite pleroma.conf'. Finalmente reinicia 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)