Guest User

default-ssl

a guest
Apr 11th, 2018
34
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <IfModule mod_ssl.c>
  2. <VirtualHost _default_:443>
  3. ServerAdmin webmaster@localhost
  4.  
  5. DocumentRoot /var/www
  6. <Directory />
  7. Options FollowSymLinks
  8. AllowOverride None
  9. </Directory>
  10. <Directory /var/www/>
  11. Options Indexes FollowSymLinks MultiViews
  12. AllowOverride None
  13. Order allow,deny
  14. allow from all
  15. </Directory>
  16.  
  17. ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
  18. <Directory "/usr/lib/cgi-bin">
  19. AllowOverride None
  20. Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
  21. Order allow,deny
  22. Allow from all
  23. </Directory>
  24.  
  25. ErrorLog ${APACHE_LOG_DIR}/error.log
  26.  
  27. # Possible values include: debug, info, notice, warn, error, crit,
  28. # alert, emerg.
  29. LogLevel warn
  30.  
  31. CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined
  32.  
  33. # SSL Engine Switch:
  34. # Enable/Disable SSL for this virtual host.
  35. SSLEngine on
  36.  
  37. # A self-signed (snakeoil) certificate can be created by installing
  38. # the ssl-cert package. See
  39. # /usr/share/doc/apache2.2-common/README.Debian.gz for more info.
  40. # If both key and certificate are stored in the same file, only the
  41. # SSLCertificateFile directive is needed.
  42. SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
  43. SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
  44.  
  45. # Server Certificate Chain:
  46. # Point SSLCertificateChainFile at a file containing the
  47. # concatenation of PEM encoded CA certificates which form the
  48. # certificate chain for the server certificate. Alternatively
  49. # the referenced file can be the same as SSLCertificateFile
  50. # when the CA certificates are directly appended to the server
  51. # certificate for convinience.
  52. #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt
  53.  
  54. # Certificate Authority (CA):
  55. # Set the CA certificate verification path where to find CA
  56. # certificates for client authentication or alternatively one
  57. # huge file containing all of them (file must be PEM encoded)
  58. # Note: Inside SSLCACertificatePath you need hash symlinks
  59. # to point to the certificate files. Use the provided
  60. # Makefile to update the hash symlinks after changes.
  61. #SSLCACertificatePath /etc/ssl/certs/
  62. #SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt
  63.  
  64. # Certificate Revocation Lists (CRL):
  65. # Set the CA revocation path where to find CA CRLs for client
  66. # authentication or alternatively one huge file containing all
  67. # of them (file must be PEM encoded)
  68. # Note: Inside SSLCARevocationPath you need hash symlinks
  69. # to point to the certificate files. Use the provided
  70. # Makefile to update the hash symlinks after changes.
  71. #SSLCARevocationPath /etc/apache2/ssl.crl/
  72. #SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl
  73.  
  74. # Client Authentication (Type):
  75. # Client certificate verification type and depth. Types are
  76. # none, optional, require and optional_no_ca. Depth is a
  77. # number which specifies how deeply to verify the certificate
  78. # issuer chain before deciding the certificate is not valid.
  79. #SSLVerifyClient require
  80. #SSLVerifyDepth 10
  81.  
  82. # Access Control:
  83. # With SSLRequire you can do per-directory access control based
  84. # on arbitrary complex boolean expressions containing server
  85. # variable checks and other lookup directives. The syntax is a
  86. # mixture between C and Perl. See the mod_ssl documentation
  87. # for more details.
  88. #<Location />
  89. #SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
  90. # and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
  91. # and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
  92. # and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
  93. # and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \
  94. # or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
  95. #</Location>
  96.  
  97. # SSL Engine Options:
  98. # Set various options for the SSL engine.
  99. # o FakeBasicAuth:
  100. # Translate the client X.509 into a Basic Authorisation. This means that
  101. # the standard Auth/DBMAuth methods can be used for access control. The
  102. # user name is the `one line' version of the client's X.509 certificate.
  103. # Note that no password is obtained from the user. Every entry in the user
  104. # file needs this password: `xxj31ZMTZzkVA'.
  105. # o ExportCertData:
  106. # This exports two additional environment variables: SSL_CLIENT_CERT and
  107. # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
  108. # server (always existing) and the client (only existing when client
  109. # authentication is used). This can be used to import the certificates
  110. # into CGI scripts.
  111. # o StdEnvVars:
  112. # This exports the standard SSL/TLS related `SSL_*' environment variables.
  113. # Per default this exportation is switched off for performance reasons,
  114. # because the extraction step is an expensive operation and is usually
  115. # useless for serving static content. So one usually enables the
  116. # exportation for CGI and SSI requests only.
  117. # o StrictRequire:
  118. # This denies access when "SSLRequireSSL" or "SSLRequire" applied even
  119. # under a "Satisfy any" situation, i.e. when it applies access is denied
  120. # and no other module can change it.
  121. # o OptRenegotiate:
  122. # This enables optimized SSL connection renegotiation handling when SSL
  123. # directives are used in per-directory context.
  124. #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
  125. <FilesMatch "\.(cgi|shtml|phtml|php)$">
  126. SSLOptions +StdEnvVars
  127. </FilesMatch>
  128. <Directory /usr/lib/cgi-bin>
  129. SSLOptions +StdEnvVars
  130. </Directory>
  131.  
  132. # SSL Protocol Adjustments:
  133. # The safe and default but still SSL/TLS standard compliant shutdown
  134. # approach is that mod_ssl sends the close notify alert but doesn't wait for
  135. # the close notify alert from client. When you need a different shutdown
  136. # approach you can use one of the following variables:
  137. # o ssl-unclean-shutdown:
  138. # This forces an unclean shutdown when the connection is closed, i.e. no
  139. # SSL close notify alert is send or allowed to received. This violates
  140. # the SSL/TLS standard but is needed for some brain-dead browsers. Use
  141. # this when you receive I/O errors because of the standard approach where
  142. # mod_ssl sends the close notify alert.
  143. # o ssl-accurate-shutdown:
  144. # This forces an accurate shutdown when the connection is closed, i.e. a
  145. # SSL close notify alert is send and mod_ssl waits for the close notify
  146. # alert of the client. This is 100% SSL/TLS standard compliant, but in
  147. # practice often causes hanging connections with brain-dead browsers. Use
  148. # this only for browsers where you know that their SSL implementation
  149. # works correctly.
  150. # Notice: Most problems of broken clients are also related to the HTTP
  151. # keep-alive facility, so you usually additionally want to disable
  152. # keep-alive for those clients, too. Use variable "nokeepalive" for this.
  153. # Similarly, one has to force some clients to use HTTP/1.0 to workaround
  154. # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
  155. # "force-response-1.0" for this.
  156. BrowserMatch "MSIE [2-6]" \
  157. nokeepalive ssl-unclean-shutdown \
  158. downgrade-1.0 force-response-1.0
  159. # MSIE 7 and newer should be able to use keepalive
  160. BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
  161.  
  162. </VirtualHost>
  163. </IfModule>
RAW Paste Data