Advertisement
Guest User

apache

a guest
Dec 28th, 2014
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. <VirtualHost *:80>
  2. ServerAdmin webmaster@localhost
  3. ServerName diaspora.com.ar
  4. ServerAlias www.diaspora.com.ar
  5.  
  6. RedirectPermanent / https://diaspora.com.ar/
  7. </VirtualHost>
  8.  
  9. <VirtualHost *:443>
  10. ServerName diaspora.com.ar
  11. ServerAlias www.diaspora.com.ar
  12.  
  13. DocumentRoot /home/diaspora/diaspora/public/
  14.  
  15. RewriteEngine On
  16.  
  17. RewriteCond %{HTTP_HOST} !^diaspora\.com\.ar [NC]
  18. RewriteRule ^/(.*)$ https://diaspora\.com\.ar/$1 [L,R,QSA]
  19.  
  20. RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  21. RewriteRule ^/(.*)$ balancer://upstream%{REQUEST_URI} [P,QSA,L]
  22.  
  23. # New for vines
  24. RewriteCond %{REQUEST_URI} ^/http-bind
  25. RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]
  26.  
  27. RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  28. RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]
  29.  
  30.  
  31.  
  32. <Proxy balancer://upstream>
  33. BalancerMember http://127.0.0.1:3000
  34. </Proxy>
  35.  
  36. ProxyRequests Off
  37. ProxyVia On
  38. ProxyPreserveHost On
  39. RequestHeader set X_FORWARDED_PROTO https
  40.  
  41. <Proxy *>
  42.  
  43. # Apache < 2.4
  44. Order allow,deny
  45. Allow from all
  46. # Apache >= 2.4
  47. #Require all granted
  48. </Proxy>
  49.  
  50. <Directory /home/diaspora/diaspora/public>
  51. Options -MultiViews
  52. # Apache < 2.4
  53. Allow from all
  54. AllowOverride all
  55. # Apache >= 2.4
  56. #Require all granted
  57. </Directory>
  58.  
  59. SSLEngine On
  60. SSLCertificateFile /home/diaspora/diaspora/certs/ssl.crt
  61. SSLCertificateKeyFile /home/diaspora/diaspora/certs/ssl-no-pass.key
  62. # maybe not needed, need for example for startssl to point to a local
  63. # copy of https://www.startssl.com/certs/class1/sha2/pem/sub.class1.server.sha2.ca.pem
  64. SSLCertificateChainFile /home/diaspora/diaspora/certs/sub.class1.server.sha2.ca.pem
  65.  
  66.  
  67. # Based on https://wiki.mozilla.org/Security/Server_Side_TLS - consider as global configuration
  68. SSLProtocol all -SSLv2 -SSLv3
  69. SSLCipherSuite ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-$
  70. SSLHonorCipherOrder on
  71. SSLCompression off
  72. #</VirtualHost>
  73.  
  74. #RewriteEngine On
  75.  
  76. #RewriteCond %{REQUEST_URI} ^/http-bind
  77. #RewriteRule ^/(http\-bind.*)$ balancer://chat%{REQUEST_URI} [P,QSA,L]
  78.  
  79. #RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  80. #RewriteRule ^/(.*)$ balancer://diaspora%{REQUEST_URI} [P,QSA,L]
  81.  
  82. <Proxy balancer://diaspora>
  83. BalancerMember http://127.0.0.1:3000
  84. </Proxy>
  85.  
  86. <Proxy balancer://chat>
  87. BalancerMember http://0.0.0.0:5280
  88. </Proxy>
  89.  
  90. </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement