Advertisement
Guest User

Untitled

a guest
Dec 10th, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.77 KB | None | 0 0
  1. <VirtualHost *:80>
  2. # The ServerName directive sets the request scheme, hostname and port that
  3. # the server uses to identify itself. This is used when creating
  4. # redirection URLs. In the context of virtual hosts, the ServerName
  5. # specifies what hostname must appear in the request's Host: header to
  6. # match this virtual host. For the default virtual host (this file) this
  7. # value is not decisive as it is used as a last resort host regardless.
  8. # However, you must set it for any further virtual host explicitly.
  9. #ServerName www.example.com
  10.  
  11. ServerAdmin webmaster@localhost
  12. DocumentRoot /var/www/html
  13.  
  14. # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
  15. # error, crit, alert, emerg.
  16. # It is also possible to configure the loglevel for particular
  17. # modules, e.g.
  18. #LogLevel info ssl:warn
  19.  
  20. ErrorLog ${APACHE_LOG_DIR}/error.log
  21. CustomLog ${APACHE_LOG_DIR}/access.log combined
  22.  
  23. # For most configuration files from conf-available/, which are
  24. # enabled or disabled at a global level, it is possible to
  25. # include a line for only one particular virtual host. For example the
  26. # following line enables the CGI configuration for this host only
  27. # after it has been globally disabled with "a2disconf".
  28. #Include conf-available/serve-cgi-bin.conf
  29. </VirtualHost>
  30.  
  31. # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
  32.  
  33. ---- deafult-ssl.conf
  34. <IfModule mod_ssl.c>
  35. <VirtualHost _default_:443>
  36. ServerAdmin webmaster@localhost
  37.  
  38. DocumentRoot /var/www/html
  39.  
  40. # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
  41. # error, crit, alert, emerg.
  42. # It is also possible to configure the loglevel for particular
  43. # modules, e.g.
  44. #LogLevel info ssl:warn
  45.  
  46. ErrorLog ${APACHE_LOG_DIR}/error.log
  47. CustomLog ${APACHE_LOG_DIR}/access.log combined
  48.  
  49. # For most configuration files from conf-available/, which are
  50. # enabled or disabled at a global level, it is possible to
  51. # include a line for only one particular virtual host. For example the
  52. # following line enables the CGI configuration for this host only
  53. # after it has been globally disabled with "a2disconf".
  54. #Include conf-available/serve-cgi-bin.conf
  55.  
  56. # SSL Engine Switch:
  57. # Enable/Disable SSL for this virtual host.
  58. SSLEngine on
  59.  
  60. # A self-signed (snakeoil) certificate can be created by installing
  61. # the ssl-cert package. See
  62. # /usr/share/doc/apache2/README.Debian.gz for more info.
  63. # If both key and certificate are stored in the same file, only the
  64. # SSLCertificateFile directive is needed.
  65. SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
  66. SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
  67.  
  68. # Server Certificate Chain:
  69. # Point SSLCertificateChainFile at a file containing the
  70. # concatenation of PEM encoded CA certificates which form the
  71. # certificate chain for the server certificate. Alternatively
  72. # the referenced file can be the same as SSLCertificateFile
  73. # when the CA certificates are directly appended to the server
  74. # certificate for convinience.
  75. #SSLCertificateChainFile /etc/apache2/ssl.crt/server-ca.crt
  76.  
  77. # Certificate Authority (CA):
  78. # Set the CA certificate verification path where to find CA
  79. # certificates for client authentication or alternatively one
  80. # huge file containing all of them (file must be PEM encoded)
  81. # Note: Inside SSLCACertificatePath you need hash symlinks
  82. # to point to the certificate files. Use the provided
  83. # Makefile to update the hash symlinks after changes.
  84. #SSLCACertificatePath /etc/ssl/certs/
  85. #SSLCACertificateFile /etc/apache2/ssl.crt/ca-bundle.crt
  86.  
  87. # Certificate Revocation Lists (CRL):
  88. # Set the CA revocation path where to find CA CRLs for client
  89. # authentication or alternatively one huge file containing all
  90. # of them (file must be PEM encoded)
  91. # Note: Inside SSLCARevocationPath you need hash symlinks
  92. # to point to the certificate files. Use the provided
  93. # Makefile to update the hash symlinks after changes.
  94. #SSLCARevocationPath /etc/apache2/ssl.crl/
  95. #SSLCARevocationFile /etc/apache2/ssl.crl/ca-bundle.crl
  96.  
  97. # Client Authentication (Type):
  98. # Client certificate verification type and depth. Types are
  99. # none, optional, require and optional_no_ca. Depth is a
  100. # number which specifies how deeply to verify the certificate
  101. # issuer chain before deciding the certificate is not valid.
  102. #SSLVerifyClient require
  103. #SSLVerifyDepth 10
  104.  
  105. # SSL Engine Options:
  106. # Set various options for the SSL engine.
  107. # o FakeBasicAuth:
  108. # Translate the client X.509 into a Basic Authorisation. This means that
  109. # the standard Auth/DBMAuth methods can be used for access control. The
  110. # user name is the `one line' version of the client's X.509 certificate.
  111. # Note that no password is obtained from the user. Every entry in the user
  112. # file needs this password: `xxj31ZMTZzkVA'.
  113. # o ExportCertData:
  114. # This exports two additional environment variables: SSL_CLIENT_CERT and
  115. # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
  116. # server (always existing) and the client (only existing when client
  117. # authentication is used). This can be used to import the certificates
  118. # into CGI scripts.
  119. # o StdEnvVars:
  120. # This exports the standard SSL/TLS related `SSL_*' environment variables.
  121. # Per default this exportation is switched off for performance reasons,
  122. # because the extraction step is an expensive operation and is usually
  123. # useless for serving static content. So one usually enables the
  124. # exportation for CGI and SSI requests only.
  125. # o OptRenegotiate:
  126. # This enables optimized SSL connection renegotiation handling when SSL
  127. # directives are used in per-directory context.
  128. #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
  129. <FilesMatch "\.(cgi|shtml|phtml|php)$">
  130. SSLOptions +StdEnvVars
  131. </FilesMatch>
  132. <Directory /usr/lib/cgi-bin>
  133. SSLOptions +StdEnvVars
  134. </Directory>
  135.  
  136. # SSL Protocol Adjustments:
  137. # The safe and default but still SSL/TLS standard compliant shutdown
  138. # approach is that mod_ssl sends the close notify alert but doesn't wait for
  139. # the close notify alert from client. When you need a different shutdown
  140. # approach you can use one of the following variables:
  141. # o ssl-unclean-shutdown:
  142. # This forces an unclean shutdown when the connection is closed, i.e. no
  143. # SSL close notify alert is send or allowed to received. This violates
  144. # the SSL/TLS standard but is needed for some brain-dead browsers. Use
  145. # this when you receive I/O errors because of the standard approach where
  146. # mod_ssl sends the close notify alert.
  147. # o ssl-accurate-shutdown:
  148. # This forces an accurate shutdown when the connection is closed, i.e. a
  149. # SSL close notify alert is send and mod_ssl waits for the close notify
  150. # alert of the client. This is 100% SSL/TLS standard compliant, but in
  151. # practice often causes hanging connections with brain-dead browsers. Use
  152. # this only for browsers where you know that their SSL implementation
  153. # works correctly.
  154. # Notice: Most problems of broken clients are also related to the HTTP
  155. # keep-alive facility, so you usually additionally want to disable
  156. # keep-alive for those clients, too. Use variable "nokeepalive" for this.
  157. # Similarly, one has to force some clients to use HTTP/1.0 to workaround
  158. # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
  159. # "force-response-1.0" for this.
  160. BrowserMatch "MSIE [2-6]" \
  161. nokeepalive ssl-unclean-shutdown \
  162. downgrade-1.0 force-response-1.0
  163. # MSIE 7 and newer should be able to use keepalive
  164. BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
  165.  
  166. </VirtualHost>
  167. </IfModule>
  168.  
  169. # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement