Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2016
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.42 KB | None | 0 0
  1.  
  2. # This is the Apache server configuration file providing SSL support using.
  3. # the mod_nss plugin. It contains the configuration directives to instruct
  4. # the server how to serve pages over an https connection.
  5. #
  6. # Do NOT simply read the instructions in here without understanding
  7. # what they do. They're here only as hints or reminders. If you are unsure
  8. # consult the online docs. You have been warned.
  9. #
  10.  
  11. LoadModule nss_module modules/libmodnss.so
  12.  
  13. #
  14. # When we also provide SSL we have to listen to the
  15. # standard HTTP port (see above) and to the HTTPS port
  16. #
  17. # Note: Configurations that use IPv6 but not IPv4-mapped addresses need two
  18. # Listen directives: "Listen [::]:8443" and "Listen 0.0.0.0:443"
  19. #
  20. Listen 8443
  21.  
  22. ##
  23. ## SSL Global Context
  24. ##
  25. ## All SSL configuration in this context applies both to
  26. ## the main server and all SSL-enabled virtual hosts.
  27. ##
  28.  
  29. #
  30. # Some MIME-types for downloading Certificates and CRLs
  31. #
  32. AddType application/x-x509-ca-cert .crt
  33. AddType application/x-pkcs7-crl .crl
  34.  
  35. # Pass Phrase Dialog:
  36. # Configure the pass phrase gathering process.
  37. # The filtering dialog program (`builtin' is a internal
  38. # terminal dialog) has to provide the pass phrase on stdout.
  39. NSSPassPhraseDialog builtin
  40.  
  41.  
  42. # Pass Phrase Helper:
  43. # This helper program stores the token password pins between
  44. # restarts of Apache.
  45. NSSPassPhraseHelper /usr/libexec/nss_pcache
  46.  
  47. # Configure the SSL Session Cache.
  48. # NSSSessionCacheSize is the number of entries in the cache.
  49. # NSSSessionCacheTimeout is the SSL2 session timeout (in seconds).
  50. # NSSSession3CacheTimeout is the SSL3/TLS session timeout (in seconds).
  51. NSSSessionCacheSize 10000
  52. NSSSessionCacheTimeout 100
  53. NSSSession3CacheTimeout 86400
  54.  
  55. #
  56. # Pseudo Random Number Generator (PRNG):
  57. # Configure one or more sources to seed the PRNG of the SSL library.
  58. # The seed data should be of good random quality.
  59. # WARNING! On some platforms /dev/random blocks if not enough entropy
  60. # is available. Those platforms usually also provide a non-blocking
  61. # device, /dev/urandom, which may be used instead.
  62. #
  63. # This does not support seeding the RNG with each connection.
  64.  
  65. NSSRandomSeed startup builtin
  66. #NSSRandomSeed startup file:/dev/random 512
  67. #NSSRandomSeed startup file:/dev/urandom 512
  68.  
  69. #
  70. # TLS Negotiation configuration under RFC 5746
  71. #
  72. # Only renegotiate if the peer's hello bears the TLS renegotiation_info
  73. # extension. Default off.
  74. NSSRenegotiation off
  75.  
  76. # Peer must send Signaling Cipher Suite Value (SCSV) or
  77. # Renegotiation Info (RI) extension in ALL handshakes. Default: off
  78. NSSRequireSafeNegotiation off
  79.  
  80. ##
  81. ## SSL Virtual Host Context
  82. ##
  83.  
  84. <VirtualHost _default_:8443>
  85.  
  86. # General setup for the virtual host
  87. #DocumentRoot "/etc/httpd/htdocs"
  88. #ServerName www.example.com:8443
  89. #ServerAdmin you@example.com
  90.  
  91. # mod_nss can log to separate log files, you can choose to do that if you'd like
  92. # LogLevel is not inherited from httpd.conf.
  93. ErrorLog /etc/httpd/logs/error_log
  94. TransferLog /etc/httpd/logs/access_log
  95. LogLevel warn
  96.  
  97. # SSL Engine Switch:
  98. # Enable/Disable SSL for this virtual host.
  99. NSSEngine on
  100.  
  101. # SSL Cipher Suite:
  102. # List the ciphers that the client is permitted to negotiate.
  103. # See the mod_nss documentation for a complete list.
  104.  
  105. # SSL 3 ciphers. SSL 2 is disabled by default.
  106. NSSCipherSuite +rsa_rc4_128_md5,+rsa_rc4_128_sha,+rsa_3des_sha,-rsa_des_sha,-rsa_rc4_40_md5,-rsa_rc2_40_md5,-rsa_null_md5,-rsa_null_sha,+fips_3des_sha,-fips_des_sha,-fortezza,-fortezza_rc4_128_sha,-fortezza_null,-rsa_des_56_sha,-rsa_rc4_56_sha,+rsa_aes_128_sha,+rsa_aes_256_sha
  107.  
  108. # SSL 3 ciphers + ECC ciphers. SSL 2 is disabled by default.
  109. #
  110. # Comment out the NSSCipherSuite line above and use the one below if you have
  111. # ECC enabled NSS and mod_nss and want to use Elliptical Curve Cryptography
  112. #NSSCipherSuite +rsa_rc4_128_md5,+rsa_rc4_128_sha,+rsa_3des_sha,-rsa_des_sha,-rsa_rc4_40_md5,-rsa_rc2_40_md5,-rsa_null_md5,-rsa_null_sha,+fips_3des_sha,-fips_des_sha,-fortezza,-fortezza_rc4_128_sha,-fortezza_null,-rsa_des_56_sha,-rsa_rc4_56_sha,+rsa_aes_128_sha,+rsa_aes_256_sha,-ecdh_ecdsa_null_sha,+ecdh_ecdsa_rc4_128_sha,+ecdh_ecdsa_3des_sha,+ecdh_ecdsa_aes_128_sha,+ecdh_ecdsa_aes_256_sha,-ecdhe_ecdsa_null_sha,+ecdhe_ecdsa_rc4_128_sha,+ecdhe_ecdsa_3des_sha,+ecdhe_ecdsa_aes_128_sha,+ecdhe_ecdsa_aes_256_sha,-ecdh_rsa_null_sha,+ecdh_rsa_128_sha,+ecdh_rsa_3des_sha,+ecdh_rsa_aes_128_sha,+ecdh_rsa_aes_256_sha,-echde_rsa_null,+ecdhe_rsa_rc4_128_sha,+ecdhe_rsa_3des_sha,+ecdhe_rsa_aes_128_sha,+ecdhe_rsa_aes_256_sha
  113.  
  114. # SSL Protocol:
  115. # Cryptographic protocols that provide communication security.
  116. # NSS handles the specified protocols as "ranges", and automatically
  117. # negotiates the use of the strongest protocol for a connection starting
  118. # with the maximum specified protocol and downgrading as necessary to the
  119. # minimum specified protocol that can be used between two processes.
  120. # Since all protocol ranges are completely inclusive, and no protocol in the
  121. # middle of a range may be excluded, the entry "NSSProtocol SSLv3,TLSv1.1"
  122. # is identical to the entry "NSSProtocol SSLv3,TLSv1.0,TLSv1.1".
  123. NSSProtocol TLSv1.0,TLSv1.1,TLSv1.2
  124.  
  125. # SSL Certificate Nickname:
  126. # The nickname of the RSA server certificate you are going to use.
  127. NSSNickname Server-Cert
  128.  
  129. # SSL Certificate Nickname:
  130. # The nickname of the ECC server certificate you are going to use, if you
  131. # have an ECC-enabled version of NSS and mod_nss
  132. #NSSECCNickname Server-Cert-ecc
  133.  
  134. # Server Certificate Database:
  135. # The NSS security database directory that holds the certificates and
  136. # keys. The database consists of 3 files: cert8.db, key3.db and secmod.db.
  137. # Provide the directory that these files exist.
  138. NSSCertificateDatabase /etc/httpd/alias
  139.  
  140. # Database Prefix:
  141. # In order to be able to store multiple NSS databases in one directory
  142. # they need unique names. This option sets the database prefix used for
  143. # cert8.db and key3.db.
  144. #NSSDBPrefix my-prefix-
  145.  
  146. # Client Authentication (Type):
  147. # Client certificate verification type. Types are none, optional and
  148. # require.
  149. #NSSVerifyClient none
  150.  
  151. #
  152. # Online Certificate Status Protocol (OCSP).
  153. # Verify that certificates have not been revoked before accepting them.
  154. #NSSOCSP off
  155.  
  156. #
  157. # Use a default OCSP responder. If enabled this will be used regardless
  158. # of whether one is included in a client certificate. Note that the
  159. # server certificate is verified during startup.
  160. #
  161. # NSSOCSPDefaultURL defines the service URL of the OCSP responder
  162. # NSSOCSPDefaultName is the nickname of the certificate to trust to
  163. # sign the OCSP responses.
  164. #NSSOCSPDefaultResponder on
  165. #NSSOCSPDefaultURL http://example.com/ocsp/status
  166. #NSSOCSPDefaultName ocsp-nickname
  167.  
  168. # Access Control:
  169. # With SSLRequire you can do per-directory access control based
  170. # on arbitrary complex boolean expressions containing server
  171. # variable checks and other lookup directives. The syntax is a
  172. # mixture between C and Perl. See the mod_nss documentation
  173. # for more details.
  174. #<Location />
  175. #NSSRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
  176. # and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
  177. # and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
  178. # and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
  179. # and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \
  180. # or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
  181. #</Location>
  182.  
  183. # SSL Engine Options:
  184. # Set various options for the SSL engine.
  185. # o FakeBasicAuth:
  186. # Translate the client X.509 into a Basic Authorisation. This means that
  187. # the standard Auth/DBMAuth methods can be used for access control. The
  188. # user name is the `one line' version of the client's X.509 certificate.
  189. # Note that no password is obtained from the user. Every entry in the user
  190. # file needs this password: `xxj31ZMTZzkVA'.
  191. # o ExportCertData:
  192. # This exports two additional environment variables: SSL_CLIENT_CERT and
  193. # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
  194. # server (always existing) and the client (only existing when client
  195. # authentication is used). This can be used to import the certificates
  196. # into CGI scripts.
  197. # o StdEnvVars:
  198. # This exports the standard SSL/TLS related `SSL_*' environment variables.
  199. # Per default this exportation is switched off for performance reasons,
  200. # because the extraction step is an expensive operation and is usually
  201. # useless for serving static content. So one usually enables the
  202. # exportation for CGI and SSI requests only.
  203. # o StrictRequire:
  204. # This denies access when "NSSRequireSSL" or "NSSRequire" applied even
  205. # under a "Satisfy any" situation, i.e. when it applies access is denied
  206. # and no other module can change it.
  207. # o OptRenegotiate:
  208. # This enables optimized SSL connection renegotiation handling when SSL
  209. # directives are used in per-directory context.
  210. #NSSOptions +FakeBasicAuth +ExportCertData +CompatEnvVars +StrictRequire
  211. <Files ~ "\.(cgi|shtml|phtml|php3?)$">
  212. NSSOptions +StdEnvVars
  213. </Files>
  214. <Directory "/var/www/cgi-bin">
  215. NSSOptions +StdEnvVars
  216. </Directory>
  217.  
  218. # Per-Server Logging:
  219. # The home of a custom SSL log file. Use this when you want a
  220. # compact non-error SSL logfile on a virtual host basis.
  221. #CustomLog /home/rcrit/redhat/apache/logs/ssl_request_log \
  222. # "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
  223.  
  224. </VirtualHost>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement