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 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <VirtualHost *:80>
  2. ServerName pleroma.example.com
  3. RewriteEngine On
  4. RewriteCond %{HTTPS} off
  5. RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
  6. RewriteCond %{HTTP:Connection} Upgrade [NC]
  7. RewriteCond %{HTTP:Upgrade} websocket [NC]
  8. RewriteRule /(.*) ws://localhost:4000/$1 [P,L]
  9. ProxyRequests off
  10. ProxyPass / http://localhost:4000/
  11. ProxyPassReverse / http://localhost:4000/
  12. RequestHeader set Host "pleroma.example.com"
  13. ProxyPreserveHost On
  14. ErrorLog ${APACHE_LOG_DIR}/error.log
  15. CustomLog ${APACHE_LOG_DIR}/access.log combined
  16. </VirtualHost>
  17. <IfModule mod_ssl.c>
  18. <VirtualHost *:443>
  19. ServerName pleroma.example.com
  20. SSLProxyCheckPeerCN off
  21. SSLProxyCheckPeerExpire off
  22. SSLProxyCheckPeerName off
  23. SSLProxyEngine On
  24. SSLProxyVerify none
  25. RewriteEngine On
  26. RewriteCond %{HTTP:Connection} Upgrade [NC]
  27. RewriteCond %{HTTP:Upgrade} websocket [NC]
  28. RewriteRule /(.*) ws://localhost:4000/$1 [P,L]
  29. ProxyRequests off
  30. ProxyPass / http://localhost:4000/
  31. ProxyPassReverse / http://localhost:4000/
  32. RequestHeader set Host "pleroma.example.com"
  33. ProxyPreserveHost On
  34. RequestHeader set X-Forwarded-Proto https
  35. SSLCertificateFile /etc/letsencrypt/live/pleroma.example.com/fullchain.pem
  36. SSLCertificateKeyFile /etc/letsencrypt/live/pleroma.example.com/privkey.pem
  37. Include /etc/letsencrypt/options-ssl-apache.conf
  38. ErrorLog ${APACHE_LOG_DIR}/error.log
  39. CustomLog ${APACHE_LOG_DIR}/access.log combined
  40. </VirtualHost>
  41. </IfModule>