Advertisement
Guest User

Untitled

a guest
Jul 19th, 2017
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.12 KB | None | 0 0
  1. <VirtualHost *:443>
  2. #General setup for the virtual host
  3. DocumentRoot "/Users/kudocc/WebServer/private"
  4. ServerName local.example.com
  5. ErrorLog "/private/var/log/apache2/local.example.com-error_log"
  6. CustomLog "/private/var/log/apache2/local.example.com-access_log" common
  7.  
  8. #SSL Engine Switch:
  9. SSLEngine on
  10.  
  11. #Server Certificate:
  12. SSLCertificateFile "/private/etc/apache2/ssl/local.example.com.crt"
  13.  
  14. #Server Private Key:
  15. SSLCertificateKeyFile "/private/etc/apache2/ssl/local.example.com.key"
  16.  
  17. #SSL Engine Options:
  18. <FilesMatch ".(cgi|shtml|phtml|php)$">
  19. SSLOptions +StdEnvVars
  20. </FilesMatch>
  21. <Directory "/Library/WebServer/CGI-Executables">
  22. SSLOptions +StdEnvVars
  23. </Directory>
  24. </VirtualHost>
  25.  
  26. VirtualHost configuration:
  27. *:443 local.example.com (/private/etc/apache2/extra/httpd-ssl.conf:293)
  28. ServerRoot: "/usr"
  29. Main DocumentRoot: "/Users/kudocc/WebServer/private"
  30. Main ErrorLog: "/private/var/log/apache2/error_log"
  31. Mutex ssl-cache: using_defaults
  32. Mutex default: dir="/private/var/run/" mechanism=default
  33. Mutex mpm-accept: using_defaults
  34. Mutex proxy-balancer-shm: using_defaults
  35. Mutex ssl-stapling-refresh: using_defaults
  36. Mutex ssl-stapling: using_defaults
  37. Mutex proxy: using_defaults
  38. PidFile: "/private/var/run/httpd.pid"
  39. Define: DUMP_VHOSTS
  40. Define: DUMP_RUN_CFG
  41. User: name="_www" id=70 not_used
  42. Group: name="_www" id=70 not_used
  43.  
  44. sudo cp /etc/apache2/original/httpd.conf /etc/apache2/httpd.conf
  45. sudo cp /etc/apache2/original/extra/httpd-ssl.conf /etc/apache2/extra/httpd-ssl.conf
  46. sudo cp /etc/apache2/original/extra/httpd-vhosts.conf /etc/apache2/extra/httpd-vhosts.conf
  47.  
  48. <VirtualHost *:443>
  49. DocumentRoot "/Users/kudocc/Sites"
  50. ServerName localhost
  51. SSLEngine on
  52. SSLCertificateFile "/private/etc/apache2/server.crt"
  53. SSLCertificateKeyFile "/private/etc/apache2/server.key"
  54. <Directory "/">
  55. Options Indexes FollowSymLinks Includes ExecCGI
  56. DirectoryIndex index.html index.php
  57. Require all granted
  58. </Directory>
  59. </VirtualHost>
  60.  
  61. <VirtualHost _default_:443>
  62.  
  63. # General setup for the virtual host
  64. DocumentRoot "/Users/kudocc/Sites"
  65. ServerName localhost:443
  66. ServerAdmin you@example.com
  67. ErrorLog "/private/var/log/apache2/error_log"
  68. TransferLog "/private/var/log/apache2/access_log"
  69.  
  70. # SSL Engine Switch:
  71. # Enable/Disable SSL for this virtual host.
  72. SSLEngine on
  73.  
  74. # Server Certificate:
  75. # Point SSLCertificateFile at a PEM encoded certificate. If
  76. # the certificate is encrypted, then you will be prompted for a
  77. # pass phrase. Note that a kill -HUP will prompt again. Keep
  78. # in mind that if you have both an RSA and a DSA certificate you
  79. # can configure both in parallel (to also allow the use of DSA
  80. # ciphers, etc.)
  81. # Some ECC cipher suites (http://www.ietf.org/rfc/rfc4492.txt)
  82. # require an ECC certificate which can also be configured in
  83. # parallel.
  84. SSLCertificateFile "/private/etc/apache2/server.crt"
  85. #SSLCertificateFile "/private/etc/apache2/server-dsa.crt"
  86. #SSLCertificateFile "/private/etc/apache2/server-ecc.crt"
  87.  
  88. # Server Private Key:
  89. # If the key is not combined with the certificate, use this
  90. # directive to point at the key file. Keep in mind that if
  91. # you've both a RSA and a DSA private key you can configure
  92. # both in parallel (to also allow the use of DSA ciphers, etc.)
  93. # ECC keys, when in use, can also be configured in parallel
  94. SSLCertificateKeyFile "/private/etc/apache2/server.key"
  95. #SSLCertificateKeyFile "/private/etc/apache2/server-dsa.key"
  96. #SSLCertificateKeyFile "/private/etc/apache2/server-ecc.key"
  97.  
  98. # Server Certificate Chain:
  99. # Point SSLCertificateChainFile at a file containing the
  100. # concatenation of PEM encoded CA certificates which form the
  101. # certificate chain for the server certificate. Alternatively
  102. # the referenced file can be the same as SSLCertificateFile
  103. # when the CA certificates are directly appended to the server
  104. # certificate for convenience.
  105. #SSLCertificateChainFile "/private/etc/apache2/server-ca.crt"
  106.  
  107. # Certificate Authority (CA):
  108. # Set the CA certificate verification path where to find CA
  109. # certificates for client authentication or alternatively one
  110. # huge file containing all of them (file must be PEM encoded)
  111. # Note: Inside SSLCACertificatePath you need hash symlinks
  112. # to point to the certificate files. Use the provided
  113. # Makefile to update the hash symlinks after changes.
  114. #SSLCACertificatePath "/private/etc/apache2/ssl.crt"
  115. #SSLCACertificateFile "/private/etc/apache2/ssl.crt/ca-bundle.crt"
  116.  
  117. # Certificate Revocation Lists (CRL):
  118. # Set the CA revocation path where to find CA CRLs for client
  119. # authentication or alternatively one huge file containing all
  120. # of them (file must be PEM encoded).
  121. # The CRL checking mode needs to be configured explicitly
  122. # through SSLCARevocationCheck (defaults to "none" otherwise).
  123. # Note: Inside SSLCARevocationPath you need hash symlinks
  124. # to point to the certificate files. Use the provided
  125. # Makefile to update the hash symlinks after changes.
  126. #SSLCARevocationPath "/private/etc/apache2/ssl.crl"
  127. #SSLCARevocationFile "/private/etc/apache2/ssl.crl/ca-bundle.crl"
  128. #SSLCARevocationCheck chain
  129.  
  130. # Client Authentication (Type):
  131. # Client certificate verification type and depth. Types are
  132. # none, optional, require and optional_no_ca. Depth is a
  133. # number which specifies how deeply to verify the certificate
  134. # issuer chain before deciding the certificate is not valid.
  135. #SSLVerifyClient require
  136. #SSLVerifyDepth 10
  137.  
  138. # TLS-SRP mutual authentication:
  139. # Enable TLS-SRP and set the path to the OpenSSL SRP verifier
  140. # file (containing login information for SRP user accounts).
  141. # Requires OpenSSL 1.0.1 or newer. See the mod_ssl FAQ for
  142. # detailed instructions on creating this file. Example:
  143. # "openssl srp -srpvfile /private/etc/apache2/passwd.srpv -add username"
  144. #SSLSRPVerifierFile "/private/etc/apache2/passwd.srpv"
  145.  
  146. # Access Control:
  147. # With SSLRequire you can do per-directory access control based
  148. # on arbitrary complex boolean expressions containing server
  149. # variable checks and other lookup directives. The syntax is a
  150. # mixture between C and Perl. See the mod_ssl documentation
  151. # for more details.
  152. #<Location />
  153. #SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/
  154. # and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd."
  155. # and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"}
  156. # and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5
  157. # and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 )
  158. # or %{REMOTE_ADDR} =~ m/^192.76.162.[0-9]+$/
  159. #</Location>
  160.  
  161. # SSL Engine Options:
  162. # Set various options for the SSL engine.
  163. # o FakeBasicAuth:
  164. # Translate the client X.509 into a Basic Authorisation. This means that
  165. # the standard Auth/DBMAuth methods can be used for access control. The
  166. # user name is the `one line' version of the client's X.509 certificate.
  167. # Note that no password is obtained from the user. Every entry in the user
  168. # file needs this password: `xxj31ZMTZzkVA'.
  169. # o ExportCertData:
  170. # This exports two additional environment variables: SSL_CLIENT_CERT and
  171. # SSL_SERVER_CERT. These contain the PEM-encoded certificates of the
  172. # server (always existing) and the client (only existing when client
  173. # authentication is used). This can be used to import the certificates
  174. # into CGI scripts.
  175. # o StdEnvVars:
  176. # This exports the standard SSL/TLS related `SSL_*' environment variables.
  177. # Per default this exportation is switched off for performance reasons,
  178. # because the extraction step is an expensive operation and is usually
  179. # useless for serving static content. So one usually enables the
  180. # exportation for CGI and SSI requests only.
  181. # o StrictRequire:
  182. # This denies access when "SSLRequireSSL" or "SSLRequire" applied even
  183. # under a "Satisfy any" situation, i.e. when it applies access is denied
  184. # and no other module can change it.
  185. # o OptRenegotiate:
  186. # This enables optimized SSL connection renegotiation handling when SSL
  187. # directives are used in per-directory context.
  188. #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
  189. <FilesMatch ".(cgi|shtml|phtml|php)$">
  190. SSLOptions +StdEnvVars
  191. </FilesMatch>
  192. <Directory "/Library/WebServer/CGI-Executables">
  193. SSLOptions +StdEnvVars
  194. </Directory>
  195.  
  196. # SSL Protocol Adjustments:
  197. # The safe and default but still SSL/TLS standard compliant shutdown
  198. # approach is that mod_ssl sends the close notify alert but doesn't wait for
  199. # the close notify alert from client. When you need a different shutdown
  200. # approach you can use one of the following variables:
  201. # o ssl-unclean-shutdown:
  202. # This forces an unclean shutdown when the connection is closed, i.e. no
  203. # SSL close notify alert is sent or allowed to be received. This violates
  204. # the SSL/TLS standard but is needed for some brain-dead browsers. Use
  205. # this when you receive I/O errors because of the standard approach where
  206. # mod_ssl sends the close notify alert.
  207. # o ssl-accurate-shutdown:
  208. # This forces an accurate shutdown when the connection is closed, i.e. a
  209. # SSL close notify alert is send and mod_ssl waits for the close notify
  210. # alert of the client. This is 100% SSL/TLS standard compliant, but in
  211. # practice often causes hanging connections with brain-dead browsers. Use
  212. # this only for browsers where you know that their SSL implementation
  213. # works correctly.
  214. # Notice: Most problems of broken clients are also related to the HTTP
  215. # keep-alive facility, so you usually additionally want to disable
  216. # keep-alive for those clients, too. Use variable "nokeepalive" for this.
  217. # Similarly, one has to force some clients to use HTTP/1.0 to workaround
  218. # their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and
  219. # "force-response-1.0" for this.
  220. BrowserMatch "MSIE [2-5]"
  221. nokeepalive ssl-unclean-shutdown
  222. downgrade-1.0 force-response-1.0
  223.  
  224. # Per-Server Logging:
  225. # The home of a custom SSL log file. Use this when you want a
  226. # compact non-error SSL logfile on a virtual host basis.
  227. CustomLog "/private/var/log/apache2/ssl_request_log"
  228. "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x "%r" %b"
  229.  
  230. </VirtualHost>
  231.  
  232. Listen 443
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement