全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 3153|回复: 15

[已解决] 呵呵,大C的SSL证书安上了

[复制链接]
发表于 2010-3-13 13:29:25 | 显示全部楼层 |阅读模式
https://de.icn.name/tmp/
我的是apache的。
发表于 2010-3-13 13:45:20 | 显示全部楼层
贴下httpd.conf文件吧。。。
发表于 2010-3-13 13:50:44 | 显示全部楼层
有cpanel的话非常容易安装
发表于 2010-3-13 14:04:00 | 显示全部楼层

回复 1# 的帖子

授人以渔吧
 楼主| 发表于 2010-3-13 14:19:23 | 显示全部楼层
呵呵,我用的是webmin.
 楼主| 发表于 2010-3-13 14:21:02 | 显示全部楼层
不知是否适用。
发表于 2010-3-13 14:22:12 | 显示全部楼层
wildcard证书就是帅啊,c大真好人。。。
 楼主| 发表于 2010-3-13 14:23:12 | 显示全部楼层
  1. #
  2. #

  3. LoadModule ssl_module modules/mod_ssl.so

  4. #
  5. # When we also provide SSL we have to listen to the
  6. # the HTTPS port in addition.
  7. #
  8. Listen 443

  9. ##
  10. ##  SSL Global Context
  11. ##
  12. ##  All SSL configuration in this context applies both to
  13. ##  the main server and all SSL-enabled virtual hosts.
  14. ##

  15. #
  16. #   Some MIME-types for downloading Certificates and CRLs
  17. #
  18. AddType application/x-x509-ca-cert .crt
  19. AddType application/x-pkcs7-crl    .crl

  20. #   Pass Phrase Dialog:
  21. #   Configure the pass phrase gathering process.
  22. #   The filtering dialog program (`builtin' is a internal
  23. #   terminal dialog) has to provide the pass phrase on stdout.
  24. SSLPassPhraseDialog  builtin

  25. #   Inter-Process Session Cache:
  26. #   Configure the SSL Session Cache: First the mechanism
  27. #   to use and second the expiring timeout (in seconds).
  28. #SSLSessionCache        dc:UNIX:/var/cache/mod_ssl/distcache
  29. SSLSessionCache         shmcb:/var/cache/mod_ssl/scache(512000)
  30. SSLSessionCacheTimeout  300

  31. #   Semaphore:
  32. #   Configure the path to the mutual exclusion semaphore the
  33. #   SSL engine uses internally for inter-process synchronization.
  34. SSLMutex default

  35. #   Pseudo Random Number Generator (PRNG):
  36. #   Configure one or more sources to seed the PRNG of the
  37. #   SSL library. The seed data should be of good random quality.
  38. #   WARNING! On some platforms /dev/random blocks if not enough entropy
  39. #   is available. This means you then cannot use the /dev/random device
  40. #   because it would lead to very long connection times (as long as
  41. #   it requires to make more entropy available). But usually those
  42. #   platforms additionally provide a /dev/urandom device which doesn't
  43. #   block. So, if available, use this one instead. Read the mod_ssl User
  44. #   Manual for more details.
  45. SSLRandomSeed startup file:/dev/urandom  256
  46. SSLRandomSeed connect builtin
  47. #SSLRandomSeed startup file:/dev/random  512
  48. #SSLRandomSeed connect file:/dev/random  512
  49. #SSLRandomSeed connect file:/dev/urandom 512

  50. #
  51. # Use "SSLCryptoDevice" to enable any supported hardware
  52. # accelerators. Use "openssl engine -v" to list supported
  53. # engine names.  NOTE: If you enable an accelerator and the
  54. # server does not start, consult the error logs and ensure
  55. # your accelerator is functioning properly.
  56. #
  57. SSLCryptoDevice builtin
  58. #SSLCryptoDevice ubsec

  59. ##
  60. ## SSL Virtual Host Context
  61. ##

  62. <VirtualHost _default_:443>

  63. # General setup for the virtual host, inherited from global configuration
  64. #DocumentRoot "/var/www/html"
  65. #ServerName www.example.com:443

  66. # Use separate log files for the SSL virtual host; note that LogLevel
  67. # is not inherited from httpd.conf.
  68. ErrorLog logs/ssl_error_log
  69. TransferLog logs/ssl_access_log
  70. LogLevel warn

  71. #   SSL Engine Switch:
  72. #   Enable/Disable SSL for this virtual host.
  73. SSLEngine on

  74. #   SSL Protocol support:
  75. # List the enable protocol levels with which clients will be able to
  76. # connect.  Disable SSLv2 access by default:
  77. SSLProtocol all -SSLv2

  78. #   SSL Cipher Suite:
  79. # List the ciphers that the client is permitted to negotiate.
  80. # See the mod_ssl documentation for a complete list.
  81. SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW

  82. #   Server Certificate:
  83. # Point SSLCertificateFile at a PEM encoded certificate.  If
  84. # the certificate is encrypted, then you will be prompted for a
  85. # pass phrase.  Note that a kill -HUP will prompt again.  A new
  86. # certificate can be generated using the genkey(1) command.
  87. #SSLCertificateFile /etc/pki/tls/certs/localhost.crt
  88. SSLCertificateFile /etc/httpd/ssl/ssl.crt

  89. #   Server Private Key:
  90. #   If the key is not combined with the certificate, use this
  91. #   directive to point at the key file.  Keep in mind that if
  92. #   you've both a RSA and a DSA private key you can configure
  93. #   both in parallel (to also allow the use of DSA ciphers, etc.)
  94. #SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
  95. SSLCertificateKeyFile /etc/httpd/ssl/ssl.key

  96. #   Server Certificate Chain:
  97. #   Point SSLCertificateChainFile at a file containing the
  98. #   concatenation of PEM encoded CA certificates which form the
  99. #   certificate chain for the server certificate. Alternatively
  100. #   the referenced file can be the same as SSLCertificateFile
  101. #   when the CA certificates are directly appended to the server
  102. #   certificate for convinience.
  103. #SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt
  104. #SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt


  105. #   Certificate Authority (CA):
  106. #   Set the CA certificate verification path where to find CA
  107. #   certificates for client authentication or alternatively one
  108. #   huge file containing all of them (file must be PEM encoded)
  109. #SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt
  110. #SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt

  111. #   Client Authentication (Type):
  112. #   Client certificate verification type and depth.  Types are
  113. #   none, optional, require and optional_no_ca.  Depth is a
  114. #   number which specifies how deeply to verify the certificate
  115. #   issuer chain before deciding the certificate is not valid.
  116. #SSLVerifyClient require
  117. #SSLVerifyDepth  10

  118. #   Access Control:
  119. #   With SSLRequire you can do per-directory access control based
  120. #   on arbitrary complex boolean expressions containing server
  121. #   variable checks and other lookup directives.  The syntax is a
  122. #   mixture between C and Perl.  See the mod_ssl documentation
  123. #   for more details.
  124. #<Location />
  125. #SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
  126. #            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
  127. #            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
  128. #            and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
  129. #            and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \
  130. #           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
  131. #</Location>

  132. #   SSL Engine Options:
  133. #   Set various options for the SSL engine.
  134. #   o FakeBasicAuth:
  135. #     Translate the client X.509 into a Basic Authorisation.  This means that
  136. #     the standard Auth/DBMAuth methods can be used for access control.  The
  137. #     user name is the `one line' version of the client's X.509 certificate.
  138. #     Note that no password is obtained from the user. Every entry in the user
  139. #     file needs this password: `xxj31ZMTZzkVA'.
  140. #   o ExportCertData:
  141. #     This exports two additional environment variables: SSL_CLIENT_CERT and
  142. #     SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
  143. #     server (always existing) and the client (only existing when client
  144. #     authentication is used). This can be used to import the certificates
  145. #     into CGI scripts.
  146. #   o StdEnvVars:
  147. #     This exports the standard SSL/TLS related `SSL_*' environment variables.
  148. #     Per default this exportation is switched off for performance reasons,
  149. #     because the extraction step is an expensive operation and is usually
  150. #     useless for serving static content. So one usually enables the
  151. #     exportation for CGI and SSI requests only.
  152. #   o StrictRequire:
  153. #     This denies access when "SSLRequireSSL" or "SSLRequire" applied even
  154. #     under a "Satisfy any" situation, i.e. when it applies access is denied
  155. #     and no other module can change it.
  156. #   o OptRenegotiate:
  157. #     This enables optimized SSL connection renegotiation handling when SSL
  158. #     directives are used in per-directory context.
  159. #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
  160. <Files ~ "\.(cgi|shtml|phtml|php3?)$">
  161.     SSLOptions +StdEnvVars
  162. </Files>
  163. <Directory "/var/www/cgi-bin">
  164.     SSLOptions +StdEnvVars
  165. </Directory>

  166. #   SSL Protocol Adjustments:
  167. #   The safe and default but still SSL/TLS standard compliant shutdown
  168. #   approach is that mod_ssl sends the close notify alert but doesn't wait for
  169. #   the close notify alert from client. When you need a different shutdown
  170. #   approach you can use one of the following variables:
  171. #   o ssl-unclean-shutdown:
  172. #     This forces an unclean shutdown when the connection is closed, i.e. no
  173. #     SSL close notify alert is send or allowed to received.  This violates
  174. #     the SSL/TLS standard but is needed for some brain-dead browsers. Use
  175. #     this when you receive I/O errors because of the standard approach where
  176. #     mod_ssl sends the close notify alert.
  177. #   o ssl-accurate-shutdown:
  178. #     This forces an accurate shutdown when the connection is closed, i.e. a
  179. #     SSL close notify alert is send and mod_ssl waits for the close notify
  180. #     alert of the client. This is 100% SSL/TLS standard compliant, but in
  181. #     practice often causes hanging connections with brain-dead browsers. Use
  182. #     this only for browsers where you know that their SSL implementation
  183. #     works correctly.
  184. #   Notice: Most problems of broken clients are also related to the HTTP
  185. #   keep-alive facility, so you usually additionally want to disable
  186. #   keep-alive for those clients, too. Use variable "nokeepalive" for this.
  187. #   Similarly, one has to force some clients to use HTTP/1.0 to workaround
  188. #   their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
  189. #   "force-response-1.0" for this.
  190. SetEnvIf User-Agent ".*MSIE.*" \
  191.          nokeepalive ssl-unclean-shutdown \
  192.          downgrade-1.0 force-response-1.0

  193. #   Per-Server Logging:
  194. #   The home of a custom SSL log file. Use this when you want a
  195. #   compact non-error SSL logfile on a virtual host basis.
  196. CustomLog logs/ssl_request_log \
  197.           "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x "%r" %b"

  198. </VirtualHost>                                 
复制代码
 楼主| 发表于 2010-3-13 14:24:14 | 显示全部楼层
上面是webmin的ssl.conf文件。
我只改动了两处,其它的都没动。
你可以参考一下。
发表于 2010-3-13 14:30:50 | 显示全部楼层
ssl.crl文件我怎么没有呢。。。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-5-23 15:14 , Processed in 0.072780 second(s), 12 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表