Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 
 

167 righe
6.2 KiB

  1. #
  2. # This is the Apache server configuration file providing SSL support.
  3. # It contains the configuration directives to instruct the server how to
  4. # serve pages over an https connection. For detailed information about these
  5. # directives see <URL:http://httpd.apache.org/docs/2.4/mod/mod_ssl.html>
  6. #
  7. # Do NOT simply read the instructions in here without understanding
  8. # what they do. They're here only as hints or reminders. If you are unsure
  9. # consult the online docs. You have been warned.
  10. #
  11. # Required modules: mod_log_config, mod_setenvif, mod_ssl,
  12. # socache_shmcb_module (for default value of SSLSessionCache)
  13. #
  14. # Pseudo Random Number Generator (PRNG):
  15. # Configure one or more sources to seed the PRNG of the SSL library.
  16. # The seed data should be of good random quality.
  17. # WARNING! On some platforms /dev/random blocks if not enough entropy
  18. # is available. This means you then cannot use the /dev/random device
  19. # because it would lead to very long connection times (as long as
  20. # it requires to make more entropy available). But usually those
  21. # platforms additionally provide a /dev/urandom device which doesn't
  22. # block. So, if available, use this one instead. Read the mod_ssl User
  23. # Manual for more details.
  24. #
  25. #SSLRandomSeed startup file:/dev/random 512
  26. #SSLRandomSeed startup file:/dev/urandom 512
  27. #SSLRandomSeed connect file:/dev/random 512
  28. #SSLRandomSeed connect file:/dev/urandom 512
  29. #
  30. # When we also provide SSL we have to listen to the
  31. # standard HTTP port (see above) and to the HTTPS port
  32. #
  33. Listen 443
  34. ##
  35. ## SSL Global Context
  36. ##
  37. ## All SSL configuration in this context applies both to
  38. ## the main server and all SSL-enabled virtual hosts.
  39. ##
  40. # SSL Cipher Suite:
  41. # List the ciphers that the client is permitted to negotiate,
  42. # and that httpd will negotiate as the client of a proxied server.
  43. # See the OpenSSL documentation for a complete list of ciphers, and
  44. # ensure these follow appropriate best practices for this deployment.
  45. # httpd 2.2.30, 2.4.13 and later force-disable aNULL, eNULL and EXP ciphers,
  46. # while OpenSSL disabled these by default in 0.9.8zf/1.0.0r/1.0.1m/1.0.2a.
  47. SSLCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES
  48. SSLProxyCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES
  49. # By the end of 2016, only TLSv1.2 ciphers should remain in use.
  50. # Older ciphers should be disallowed as soon as possible, while the
  51. # kRSA ciphers do not offer forward secrecy. These changes inhibit
  52. # older clients (such as IE6 SP2 or IE8 on Windows XP, or other legacy
  53. # non-browser tooling) from successfully connecting.
  54. #
  55. # To restrict mod_ssl to use only TLSv1.2 ciphers, and disable
  56. # those protocols which do not support forward secrecy, replace
  57. # the SSLCipherSuite and SSLProxyCipherSuite directives above with
  58. # the following two directives, as soon as practical.
  59. # SSLCipherSuite HIGH:MEDIUM:!SSLv3:!kRSA
  60. # SSLProxyCipherSuite HIGH:MEDIUM:!SSLv3:!kRSA
  61. # User agents such as web browsers are not configured for the user's
  62. # own preference of either security or performance, therefore this
  63. # must be the prerogative of the web server administrator who manages
  64. # cpu load versus confidentiality, so enforce the server's cipher order.
  65. SSLHonorCipherOrder on
  66. # SSL Protocol support:
  67. # List the protocol versions which clients are allowed to connect with.
  68. # Disable SSLv3 by default (cf. RFC 7525 3.1.1). TLSv1 (1.0) should be
  69. # disabled as quickly as practical. By the end of 2016, only the TLSv1.2
  70. # protocol or later should remain in use.
  71. SSLProtocol all -SSLv3
  72. SSLProxyProtocol all -SSLv3
  73. # Pass Phrase Dialog:
  74. # Configure the pass phrase gathering process.
  75. # The filtering dialog program (`builtin' is an internal
  76. # terminal dialog) has to provide the pass phrase on stdout.
  77. SSLPassPhraseDialog builtin
  78. # Inter-Process Session Cache:
  79. # Configure the SSL Session Cache: First the mechanism
  80. # to use and second the expiring timeout (in seconds).
  81. #SSLSessionCache "dbm:/usr/local/apache2/logs/ssl_scache"
  82. SSLSessionCache "shmcb:/usr/local/apache2/logs/ssl_scache(512000)"
  83. SSLSessionCacheTimeout 300
  84. # OCSP Stapling (requires OpenSSL 0.9.8h or later)
  85. #
  86. # This feature is disabled by default and requires at least
  87. # the two directives SSLUseStapling and SSLStaplingCache.
  88. # Refer to the documentation on OCSP Stapling in the SSL/TLS
  89. # How-To for more information.
  90. #
  91. # Enable stapling for all SSL-enabled servers:
  92. #SSLUseStapling On
  93. # Define a relatively small cache for OCSP Stapling using
  94. # the same mechanism that is used for the SSL session cache
  95. # above. If stapling is used with more than a few certificates,
  96. # the size may need to be increased. (AH01929 will be logged.)
  97. #SSLStaplingCache "shmcb:/usr/local/apache2/logs/ssl_stapling(32768)"
  98. # Seconds before valid OCSP responses are expired from the cache
  99. #SSLStaplingStandardCacheTimeout 3600
  100. # Seconds before invalid OCSP responses are expired from the cache
  101. #SSLStaplingErrorCacheTimeout 600
  102. ##
  103. ## SSL Virtual Host Context
  104. ##
  105. ErrorLog /proc/self/fd/2
  106. TransferLog /proc/self/fd/1
  107. ServerAdmin EMAIL
  108. <VirtualHost *:443>
  109. ServerName admin.FQDN
  110. Alias /static/ /var/www/html/static/
  111. <Directory /var/www/html/static>
  112. Require all granted
  113. </Directory>
  114. ProxyPass /static/ !
  115. ProxyPass / http://backend:8000/
  116. ProxyPassReverse / http://backend:8000/
  117. SSLEngine on
  118. SSLCertificateFile "/usr/local/apache2/conf/CRT_PATH"
  119. SSLCertificateKeyFile "/usr/local/apache2/conf/KEY_PATH"
  120. </VirtualHost>
  121. <VirtualHost *:443>
  122. ServerName api.FQDN
  123. Alias /static/ /var/www/html/static/
  124. <Directory /var/www/html/static>
  125. Require all granted
  126. </Directory>
  127. ProxyPass /static/ !
  128. ProxyPass / http://backend:8000/api/
  129. ProxyPassReverse / http://backend:8000/api/
  130. SSLEngine on
  131. SSLCertificateFile "/usr/local/apache2/conf/CRT_PATH"
  132. SSLCertificateKeyFile "/usr/local/apache2/conf/KEY_PATH"
  133. </VirtualHost>
  134. <VirtualHost *:443>
  135. ServerName FQDN
  136. ServerAlias www.FQDN
  137. ProxyPass /api/ http://backend:8000/api/
  138. ProxyPassReverse /api/ http://backend:8000/api/
  139. ProxyPass / http://frontend/
  140. ProxyPassReverse / http://frontend/
  141. SSLEngine on
  142. SSLCertificateFile "/usr/local/apache2/conf/CRT_PATH"
  143. SSLCertificateKeyFile "/usr/local/apache2/conf/KEY_PATH"
  144. </VirtualHost>