cable.conf 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <VirtualHost *:443>
  2. ServerName cable-service-ca.cable.im
  3. SSLEngine On
  4. # Su cable-service-ca.cable.im serve un certificato valido (letsencrypt).
  5. # È l'hostname a cui si connette Twilio per ottenere le informazioni
  6. # necessarie a fare la verifica del numero tramite chiamata vocale.
  7. SSLCertificateFile /etc/letsencrypt/live/cable-service-ca.cable.im/cert.pem
  8. SSLCertificateKeyFile /etc/letsencrypt/live/cable-service-ca.cable.im/privkey.pem
  9. Include /etc/letsencrypt/options-ssl-apache.conf
  10. SSLCertificateChainFile /etc/letsencrypt/live/cable-service-ca.cable.im/chain.pem
  11. ProxyVia On
  12. ProxyPreserveHost On
  13. ProxyPass / http://127.0.0.1:4242/
  14. ProxyPassReverse / http://127.0.0.1:4242/
  15. </VirtualHost>
  16. <VirtualHost *:443>
  17. ServerName cable-service.cable.im
  18. SSLEngine On
  19. # Per il servizio Signal vero e proprio usiamo invece il certificato self-signed.
  20. # Nel keystore del'app Android è il root certificate della nostra CA, assicurando
  21. # così che l'app riconosca come validi solo i certificati emessi dalla nostra CA.
  22. SSLCertificateFile /home/cable/certificati/whisper.crt
  23. SSLCertificateKeyFile /home/cable/certificati/whisper.key
  24. Include /etc/letsencrypt/options-ssl-apache.conf
  25. #SSLCertificateChainFile /home/cable/certificati/whisper.crt
  26. # Per proxare websocket (ws://) serve questa roba:
  27. #
  28. # https://httpd.apache.org/docs/2.4/mod/mod_proxy_wstunnel.html
  29. ProxyVia On
  30. ProxyPreserveHost On
  31. ProxyPass / ws://127.0.0.1:4242/
  32. ProxyPassReverse / ws://127.0.0.1:4242/
  33. </VirtualHost>
  34. <VirtualHost *:80>
  35. ServerName giphy.com
  36. ServerAlias *.giphy.com
  37. ProxyRequests On
  38. ProxyVia Block
  39. ProxyPreserveHost On
  40. ## The AllowConnect directive specifies a list of ports
  41. ## to which the proxy CONNECT method may connect.
  42. AllowConnect 443
  43. ## Only ever allow incoming HTTP CONNECT requests.
  44. ## Explicitly deny other request types like GET, POST, etc.
  45. ## This tells Apache to return a 403 Forbidden if this virtual
  46. ## host receives anything other than an HTTP CONNECT.
  47. <Location />
  48. <LimitExcept CONNECT>
  49. Order allow,deny
  50. Deny from all
  51. </LimitExcept>
  52. </Location>
  53. <Proxy *>
  54. Order allow,deny
  55. Deny from all
  56. </Proxy>
  57. <Proxy "*.giphy.com:443">
  58. Allow from all
  59. </Proxy>
  60. </VirtualHost>