Advertisement
Guest User

Untitled

a guest
Sep 13th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.69 KB | None | 0 0
  1. (OLD)
  2.  
  3. <VirtualHost *:80>
  4. ServerName www.cryptospora.net
  5. ServerAlias cryptospora.net
  6. DocumentRoot /path/to/diaspora/public
  7. RewriteEngine on
  8. #disable APACHE commands that are not GET or PUT
  9. RewriteCond %{REQUEST_METHOD} ^(delete|head|trace|track) [NC]
  10. RewriteRule ^(.*)$ - [F,L]
  11. #redirect all www requests to port 443 for encryption
  12. RedirectPermanent / https://cryptospora.net/
  13. AllowOverride All
  14. </VirtualHost>
  15.  
  16. (NEW)
  17.  
  18. <VirtualHost *:80>
  19. ServerName www.cryptospora.net
  20. ServerAlias cryptospora.net
  21. DocumentRoot /path/to/diaspora/public
  22. ErrorLog ${APACHE_LOG_DIR}/error.log
  23. CustomLog ${APACHE_LOG_DIR}/access.log combined
  24. <Directory /home/locutus/Web/diaspora/diaspora/public>
  25. Options Indexes FollowSymLinks
  26. AllowOverride All
  27. Require all granted
  28. </Directory>
  29. RewriteEngine on
  30. RewriteCond %{SERVER_NAME} =cryptospora.net [OR]
  31. RewriteCond %{SERVER_NAME} =www.cryptospora.net
  32. RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
  33. </VirtualHost>
  34.  
  35. (OLD)
  36.  
  37. <VirtualHost 127.0.0.1:80>
  38. DocumentRoot /home/locutus/Web/diaspora/diaspora/public
  39. RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  40. RewriteRule ^/(.*)$ balancer://thinservers%{REQUEST_URI} [P,QSA,L]
  41. <Proxy balancer://thinservers>
  42. BalancerMember http://127.0.0.1:3000
  43. </Proxy>
  44. ProxyRequests On
  45. ProxyVia On
  46. ProxyPreserveHost On
  47. ErrorDocument 503 "Cryptospora.net server message: please check back soon."
  48. ProxyPass / http://localhost:3000/
  49. ProxyPassReverse / http://localhost:3000/
  50. <Proxy *>
  51. Order allow,deny
  52. Allow from all
  53. </Proxy>
  54. <Directory "/home/locutus/Web/diaspora/diaspora/public">
  55. Options Indexes FollowSymLinks MultiViews Includes ExecCGI
  56. AllowOverride All
  57. Order Allow,Deny
  58. Allow from All
  59. Options -MultiViews
  60. </Directory>
  61. <VirtualHost>
  62.  
  63.  
  64. <IfModule mod_ssl.c>
  65. <VirtualHost _default_:443>
  66. SSLEngine On
  67. SSLProtocol all -SSLv2 -SSLv3
  68. SSLHonorCipherOrder on
  69. SSLCipherSuite EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+SHA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:EDH+aRSA:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4:!SSLv2:!SSLv3
  70.  
  71. SSLCertificateFile /etc/apache2/ssl/cryptospora.net.pem
  72.  
  73. SSLCertificateKeyFile /etc/apache2/ssl/cryptospora.key
  74. SSLCertificateChainFile /etc/apache2/ssl/trust-chain.crt
  75. SSLCACertificatePath /etc/apache2/ssl/
  76. RequestHeader set X_FORWARDED_PROTO https
  77.  
  78. ServerName www.cryptospora.net
  79. ServerAlias cryptospora.net
  80. DocumentRoot /path/to/diaspora/public
  81.  
  82. RewriteEngine On
  83.  
  84. #force requests to www. to get stripped of the www. prefix (Doesn't work!???)
  85. RewriteCond %{HTTP_HOST} ^www.cryptospora.net$ [NC]
  86. RewriteRule ^(.*)$ https://cryptospora.net/$1 [R=301,L]
  87.  
  88. RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  89. RewriteRule ^/(.*)$ balancer://thinservers%{REQUEST_URI} [P,QSA,L]
  90. <Proxy balancer://thinservers>
  91. BalancerMember http://127.0.0.1:3000
  92. </Proxy>
  93. ProxyRequests On
  94. ProxyVia On
  95. ProxyPreserveHost On
  96. ErrorDocument 503 "Cryptospora.net server message: please check back soon."
  97. ProxyPass / http://localhost:3000/
  98. ProxyPassReverse / http://localhost:3000/
  99. <Proxy *>
  100. Order allow,deny
  101. Allow from all
  102. </Proxy>
  103. <Directory "/path/to/diaspora/public">
  104. Options Indexes FollowSymLinks MultiViews Includes ExecCGI
  105. AllowOverride All
  106. Order Allow,Deny
  107. Allow from All
  108. Options -MultiViews
  109. </Directory>
  110. </VirtualHost>
  111. </IfModule>
  112.  
  113. (NEW)
  114.  
  115. <IfModule mod_ssl.c>
  116. <VirtualHost *:443>
  117. ServerName www.cryptospora.net
  118. ServerAlias cryptospora.net
  119. DocumentRoot /path/to/diaspora/public
  120.  
  121. ErrorLog ${APACHE_LOG_DIR}/error.log
  122. CustomLog ${APACHE_LOG_DIR}/access.log combined
  123.  
  124. PassengerRuby /path/to/.rvm/gems/ruby-2.3.0/wrappers/ruby
  125. RailsEnv production
  126.  
  127. <Directory /path/to/diaspora/public>
  128. Options FollowSymLinks
  129. Require all granted
  130. </Directory>
  131.  
  132. Include /etc/letsencrypt/options-ssl-apache.conf
  133. Include /etc/letsencrypt/options-ssl-apache.conf
  134. Include /etc/letsencrypt/options-ssl-apache.conf
  135. SSLCertificateFile /etc/letsencrypt/live/cryptospora.net/cert.pem
  136. SSLCertificateKeyFile /etc/letsencrypt/live/cryptospora.net/privkey.pem
  137. SSLCertificateChainFile /etc/letsencrypt/live/cryptospora.net/chain.pem
  138. </VirtualHost>
  139. </IfModule>
  140.  
  141.  
  142. # this enables Passenger (in apache.conf)
  143. LoadModule passenger_module /path/to/.rvm/gems/ruby-2.3.0/gems/passenger-5.1.5/buildout/apache2/mod_passenger.so
  144. <IfModule mod_passenger.c>
  145. PassengerRoot /path/.rvm/gems/ruby-2.3.0/gems/passenger-5.1.5
  146. PassengerDefaultRuby /path/.rvm/gems/ruby-2.3.0/wrappers/ruby
  147. PassengerMaxPoolSize 10
  148. PassengerPoolIdleTime 90
  149. PassengerMaxRequests 10000
  150. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement