Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
1595 connectés 

  FORUM HardWare.fr
  Réseaux grand public / SoHo
  Réseaux

  Passer WAMPSERVER en HTTPS

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Passer WAMPSERVER en HTTPS

n°1217518
erwan83
Du Shift DEL tu te méfieras !
Posté le 23-06-2023 à 10:56:20  profilanswer
 

Bonjour
Je viens demander ici en désespoir de cause.
J'ai fait tous les tutos, tous les topics et je plante toujours pour acceder à mon site en https
 
Je vais essayer de faire un copier coller de mes fichiers pour vous montrer
Je suis sous Windows avec un serveur Wampserver64 version Apache 2.4.41
Toute aide serait extrêmement appréciée.
 
En local quand j'essaye d'acceder au site via SSL , j'ai ce message :
 
Ce site ne peut pas fournir de connexion sécurisée
 
Dans Apache/conf/cert j'ai généré un fichier .RND
Dans Apache/conf/key j'ai un fichier private.key
Dans Apache/conf/ssl j'ai le certificat et son fichier .KEY
 
 
 
 
 
 
Httpd.conf ==>
 

Code :
  1. # Listen: Allows you to bind Apache to specific IP addresses and/or
  2. # ports, instead of the default. See also the <VirtualHost>
  3. # directive.
  4. #
  5. # Change this to Listen on specific IP addresses as shown below to
  6. # prevent Apache from glomming onto all bound IP addresses.
  7. #
  8. #Listen 12.34.56.78:80
  9. Listen 0.0.0.0:80
  10. Listen 0.0.0.0:443
  11. ### celui-ci permet de passer mais ca ne marche que en local
  12. Listen [:0]:80
  13. Listen [:0]:443
  14. LoadModule access_compat_module modules/mod_access_compat.so
  15. LoadModule actions_module modules/mod_actions.so
  16. LoadModule alias_module modules/mod_alias.so
  17. LoadModule allowmethods_module modules/mod_allowmethods.so
  18. LoadModule asis_module modules/mod_asis.so
  19. LoadModule auth_basic_module modules/mod_auth_basic.so
  20. LoadModule auth_digest_module modules/mod_auth_digest.so
  21. LoadModule authn_core_module modules/mod_authn_core.so
  22. LoadModule authn_file_module modules/mod_authn_file.so
  23. LoadModule authz_core_module modules/mod_authz_core.so
  24. LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
  25. LoadModule authz_host_module modules/mod_authz_host.so
  26. LoadModule authz_user_module modules/mod_authz_user.so
  27. LoadModule autoindex_module modules/mod_autoindex.so
  28. LoadModule cache_module modules/mod_cache.so
  29. LoadModule cache_disk_module modules/mod_cache_disk.so
  30. LoadModule dir_module modules/mod_dir.so
  31. LoadModule env_module modules/mod_env.so
  32. LoadModule file_cache_module modules/mod_file_cache.so
  33. LoadModule include_module modules/mod_include.so
  34. LoadModule isapi_module modules/mod_isapi.so
  35. LoadModule log_config_module modules/mod_log_config.so
  36. LoadModule mime_module modules/mod_mime.so
  37. #LoadModule mime_magic_module modules/mod_mime_magic.so
  38. LoadModule negotiation_module modules/mod_negotiation.so
  39. LoadModule rewrite_module modules/mod_rewrite.so
  40. #LoadModule session_crypto_module modules/mod_session_crypto.so
  41. #LoadModule session_dbd_module modules/mod_session_dbd.so
  42. LoadModule setenvif_module modules/mod_setenvif.so
  43. ###### ci dessous decoché
  44. LoadModule socache_shmcb_module modules/mod_socache_shmcb.so
  45. LoadModule ssl_module modules/mod_ssl.so
  46. LoadModule userdir_module modules/mod_userdir.so
  47. LoadModule vhost_alias_module modules/mod_vhost_alias.so
  48. PHPIniDir "${APACHE_DIR}/bin"
  49. LoadModule php7_module "${INSTALL_DIR}/bin/php/php7.4.0/php7apache2_4.dll"
  50. <IfModule unixd_module>
  51. #
  52. # If you wish httpd to run as a different user or group, you must run
  53. # httpd as root initially and it will switch.
  54. #
  55. # User/Group: The name (or #number) of the user/group to run httpd as.
  56. # It is usually good practice to create a dedicated user and group for
  57. # running httpd, as with most system services.
  58. #
  59. User daemon
  60. Group daemon
  61. </IfModule>
  62. # 'Main' server configuration
  63. #
  64. # The directives in this section set up the values used by the 'main'
  65. # server, which responds to any requests that aren't handled by a
  66. # <VirtualHost> definition.  These values also provide defaults for
  67. # any <VirtualHost> containers you may define later in the file.
  68. #
  69. # All of these directives may appear inside <VirtualHost> containers,
  70. # in which case these default settings will be overridden for the
  71. # virtual host being defined.
  72. #
  73. ServerName localhost:80
  74. <Files "*.*">
  75.    order allow,deny
  76. allow from all
  77. </Files>
  78. <Directory />
  79.     AllowOverride none
  80. #    Require all denied
  81.     Require all granted
  82. </Directory>
  83. HostnameLookups Off
  84. DocumentRoot "${INSTALL_DIR}/www"
  85. <Directory "${INSTALL_DIR}/www/">
  86.     Options +Indexes +FollowSymLinks +Multiviews
  87.     AllowOverride all
  88. #   onlineoffline tag - don't remove
  89. #    Require local
  90. Require all granted
  91. </Directory>
  92. <IfModule dir_module>
  93.     DirectoryIndex index.php index.php3 index.html index.htm
  94. </IfModule>
  95. #
  96. # The following lines prevent .htaccess and .htpasswd files from being
  97. # viewed by Web clients.
  98. #
  99. <Files ".ht*">
  100.     Require all denied
  101. </Files>
  102. ErrorLog "${INSTALL_DIR}/logs/apache_error.log"
  103. LogLevel warn
  104. <IfModule log_config_module>
  105.     LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  106.     LogFormat "%h %l %u %t \"%r\" %>s %b" common
  107.     <IfModule logio_module>
  108.       # You need to enable mod_logio.c to use %I and %O
  109.       LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
  110.     </IfModule>
  111.     CustomLog "${INSTALL_DIR}/logs/access.log" common
  112. </IfModule>
  113. <IfModule alias_module>
  114.     ScriptAlias /cgi-bin/ "${SRVROOT}/cgi-bin/"
  115. </IfModule>
  116. <IfModule cgid_module>
  117. </IfModule>
  118. <Directory "${SRVROOT}/cgi-bin">
  119.     AllowOverride None
  120.     Options None
  121.     Require all granted
  122. </Directory>
  123. <IfModule headers_module>
  124.     RequestHeader unset Proxy early
  125. </IfModule>
  126. <IfModule mime_module>
  127.     #
  128.     # TypesConfig points to the file containing the list of mappings from
  129.     # filename extension to MIME-type.
  130.     #
  131.     TypesConfig conf/mime.types
  132.     #
  133.     # AddEncoding allows you to have certain browsers uncompress
  134.     # information on the fly. Note: Not all browsers support this.
  135.     #
  136.     AddEncoding x-compress .Z
  137.     AddEncoding x-gzip .gz .tgz
  138.     #
  139.     # If the AddEncoding directives above are commented-out, then you
  140.     # probably should define those extensions to indicate media types:
  141.     #
  142.     AddType application/x-compress .Z
  143.     AddType application/x-gzip .gz .tgz
  144.     AddType application/x-httpd-php .php
  145.     AddType application/x-httpd-php .php3
  146.     # AddHandler allows you to map certain file extensions to "handlers":
  147.     # actions unrelated to filetype. These can be either built into the server
  148.     # or added with the Action directive (see below)
  149.     #
  150.     # To use CGI scripts outside of ScriptAliased directories:
  151.     # (You will also need to add "ExecCGI" to the "Options" directive.)
  152.     #
  153.     #AddHandler cgi-script .cgi
  154.     # For type maps (negotiated resources):
  155.     #AddHandler type-map var
  156.     #
  157.     # Filters allow you to process content before it is sent to the client.
  158.     #
  159.     # To parse .shtml files for server-side includes (SSI):
  160.     # (You will also need to add "Includes" to the "Options" directive.)
  161.     #
  162.     #AddType text/html .shtml
  163.     #AddOutputFilter INCLUDES .shtml
  164. </IfModule>
  165. #
  166. # The mod_mime_magic module allows the server to use various hints from the
  167. # contents of the file itself to determine its type.  The MIMEMagicFile
  168. # directive tells the module where the hint definitions are located.
  169. #
  170. #MIMEMagicFile conf/magic
  171. #
  172. # MaxRanges: Maximum number of Ranges in a request before
  173. # returning the entire resource, or one of the special
  174. # values 'default', 'none' or 'unlimited'.
  175. # Default setting is to accept 200 Ranges.
  176. #MaxRanges unlimited
  177. # Defaults: EnableMMAP On, EnableSendfile Off
  178. #
  179. #EnableMMAP off
  180. EnableSendfile off
  181. # AcceptFilter: On Windows, none uses accept() rather than AcceptEx() and
  182. # will not recycle sockets between connections. This is useful for network
  183. # adapters with broken driver support, as well as some virtual network
  184. # providers such as vpn drivers, or spam, virus or spyware filters.
  185. AcceptFilter http none
  186. AcceptFilter https none
  187. # Server-pool management (MPM specific)
  188. Include conf/extra/httpd-mpm.conf
  189. # Multi-language error messages
  190. #Include conf/extra/httpd-multilang-errordoc.conf
  191. # Fancy directory listings
  192. Include conf/extra/httpd-autoindex.conf
  193. # Language settings
  194. #Include conf/extra/httpd-languages.conf
  195. # User home directories
  196. #Include conf/extra/httpd-userdir.conf
  197. # Real-time info on requests and configuration
  198. #Include conf/extra/httpd-info.conf
  199. # Virtual hosts
  200. Include conf/extra/httpd-vhosts.conf
  201. # Local access to the Apache HTTP Server Manual
  202. #Include conf/extra/httpd-manual.conf
  203. # Distributed authoring and versioning (WebDAV)
  204. #Include conf/extra/httpd-dav.conf
  205. # Various default settings
  206. #Include conf/extra/httpd-default.conf
  207. # Configure mod_proxy_html to understand HTML4/XHTML1
  208. <IfModule proxy_html_module>
  209. Include conf/extra/proxy-html.conf
  210. </IfModule>
  211. # Secure (SSL/TLS) connections
  212. # j'ai essayé mais ça plante ==>
  213. #Include conf/extra/httpd-ssl.conf
  214. #
  215. # Note: The following must must be present to support
  216. #       starting without SSL on platforms with no /dev/random equivalent
  217. #       but a statically compiled-in mod_ssl.
  218. #
  219. <IfModule ssl_module>
  220. SSLRandomSeed startup builtin
  221. SSLRandomSeed connect builtin
  222. </IfModule>
  223. Include "${INSTALL_DIR}/alias/*"


 
Httpd-ssl.conf ==>
 

Code :
  1. #
  2. # This is the Apache server configuration file providing SSL support.
  3. # It contains the configuration directives to instruct the server how to
  4. # serve pages over an https connection. For detailed information about these
  5. # directives see <URL:http://httpd.apache.org/docs/2.4/mod/mod_ssl.html>
  6. #
  7. # Do NOT simply read the instructions in here without understanding
  8. # what they do.  They're here only as hints or reminders.  If you are unsure
  9. # consult the online docs. You have been warned. 
  10. #
  11. # Required modules: mod_log_config, mod_setenvif, mod_ssl,
  12. ###### retiré
  13.           socache_shmcb_module (for default value of SSLSessionCache)
  14. #
  15. # Pseudo Random Number Generator (PRNG):
  16. #SSLRandomSeed startup file:/dev/random  512
  17. #SSLRandomSeed startup file:/dev/urandom 512
  18. #SSLRandomSeed connect file:/dev/random  512
  19. #SSLRandomSeed connect file:/dev/urandom 512
  20. #
  21. # When we also provide SSL we have to listen to the
  22. # standard HTTP port (see above) and to the HTTPS port
  23. #
  24. Listen 443
  25. ##
  26. ##  SSL Global Context
  27. ##
  28. ##  All SSL configuration in this context applies both to
  29. ##  the main server and all SSL-enabled virtual hosts.
  30. ##
  31. SSLCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES
  32. SSLProxyCipherSuite HIGH:MEDIUM:!MD5:!RC4:!3DES
  33. # SSLCipherSuite HIGH:MEDIUM:!SSLv3:!kRSA
  34. # SSLProxyCipherSuite HIGH:MEDIUM:!SSLv3:!kRSA
  35. #   User agents such as web browsers are not configured for the user's
  36. #   own preference of either security or performance, therefore this
  37. #   must be the prerogative of the web server administrator who manages
  38. #   cpu load versus confidentiality, so enforce the server's cipher order.
  39. SSLHonorCipherOrder on
  40. #   SSL Protocol support:
  41. SSLProtocol all -SSLv3
  42. SSLProxyProtocol all -SSLv3
  43. #   Pass Phrase Dialog:
  44. #   Configure the pass phrase gathering process.
  45. #   The filtering dialog program (`builtin' is an internal
  46. #   terminal dialog) has to provide the pass phrase on stdout.
  47. SSLPassPhraseDialog  builtin
  48. #   Inter-Process Session Cache:
  49. #   Configure the SSL Session Cache: First the mechanism
  50. #   to use and second the expiring timeout (in seconds).
  51. SSLSessionCache "shmcb:***************/apache2.4.41/conf/ssl/logs/ssl_scache(512000)"
  52. SSLSessionCacheTimeout  300
  53. #   Enable stapling for all SSL-enabled servers:
  54. #SSLUseStapling On
  55. #   Define a relatively small cache for OCSP Stapling using
  56. #   the same mechanism that is used for the SSL session cache
  57. #   above.  If stapling is used with more than a few certificates,
  58. #   the size may need to be increased.  (AH01929 will be logged.)
  59. #SSLStaplingCache "shmcb:${SRVROOT}/logs/ssl_stapling(32768)"
  60. #   Seconds before valid OCSP responses are expired from the cache
  61. #SSLStaplingStandardCacheTimeout 3600
  62. #   Seconds before invalid OCSP responses are expired from the cache
  63. #SSLStaplingErrorCacheTimeout 600
  64. ##
  65. ## SSL Virtual Host Context
  66. ##
  67. <VirtualHost _default_:443>
  68. #   General setup for the virtual host
  69. DocumentRoot "********************/
  70. ServerName localhost:443
  71. ServerAdmin admin@example.com
  72. ErrorLog "*************/apache2.4.41/conf/ssl/logs/ssl_error.log"
  73. TransferLog "********************/apache2.4.41/conf/ssl/logs/ssl_access.log"
  74. #   SSL Engine Switch:
  75. #   Enable/Disable SSL for this virtual host.
  76. SSLEngine on
  77. #   Server Certificate:
  78. #   Point SSLCertificateFile at a PEM encoded certificate.  If
  79. #   the certificate is encrypted, then you will be prompted for a
  80. #   pass phrase.  Note that a kill -HUP will prompt again.  Keep
  81. #   in mind that if you have both an RSA and a DSA certificate you
  82. #   can configure both in parallel (to also allow the use of DSA
  83. #   ciphers, etc.)
  84. #   Some ECC cipher suites (http://www.ietf.org/rfc/rfc4492.txt)
  85. #   require an ECC certificate which can also be configured in
  86. #   parallel.
  87. SSLCertificateFile "********************/apache2.4.41/conf/ssl/localhost.crt"
  88. #SSLCertificateFile "${SRVROOT}/conf/server-dsa.crt"
  89. #SSLCertificateFile "${SRVROOT}/conf/server-ecc.crt"
  90. #   Server Private Key:
  91. #   If the key is not combined with the certificate, use this
  92. #   directive to point at the key file.  Keep in mind that if
  93. #   you've both a RSA and a DSA private key you can configure
  94. #   both in parallel (to also allow the use of DSA ciphers, etc.)
  95. #   ECC keys, when in use, can also be configured in parallel
  96. SSLCertificateKeyFile "***************/apache2.4.41/conf/ssl/localhost.key"
  97. #SSLCertificateKeyFile "${SRVROOT}/conf/server-dsa.key"
  98. #SSLCertificateKeyFile "${SRVROOT}/conf/server-ecc.key"
  99. #   Server Certificate Chain:
  100. #   Point SSLCertificateChainFile at a file containing the
  101. #   concatenation of PEM encoded CA certificates which form the
  102. #   certificate chain for the server certificate. Alternatively
  103. #   the referenced file can be the same as SSLCertificateFile
  104. #   when the CA certificates are directly appended to the server
  105. #   certificate for convenience.
  106. #SSLCertificateChainFile "${SRVROOT}/conf/server-ca.crt"
  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 "${SRVROOT}/conf/ssl.crt"
  115. #SSLCACertificateFile "${SRVROOT}/conf/ssl.crt/ca-bundle.crt"
  116. #   Certificate Revocation Lists (CRL):
  117. #   Set the CA revocation path where to find CA CRLs for client
  118. #   authentication or alternatively one huge file containing all
  119. #   of them (file must be PEM encoded).
  120. #   The CRL checking mode needs to be configured explicitly
  121. #   through SSLCARevocationCheck (defaults to "none" otherwise).
  122. #   Note: Inside SSLCARevocationPath you need hash symlinks
  123. #         to point to the certificate files. Use the provided
  124. #         Makefile to update the hash symlinks after changes.
  125. #SSLCARevocationPath "${SRVROOT}/conf/ssl.crl"
  126. #SSLCARevocationFile "${SRVROOT}/conf/ssl.crl/ca-bundle.crl"
  127. #SSLCARevocationCheck chain
  128. #   Client Authentication (Type):
  129. #   Client certificate verification type and depth.  Types are
  130. #   none, optional, require and optional_no_ca.  Depth is a
  131. #   number which specifies how deeply to verify the certificate
  132. #   issuer chain before deciding the certificate is not valid.
  133. #SSLVerifyClient require
  134. #SSLVerifyDepth  10
  135. #   TLS-SRP mutual authentication:
  136. #   Enable TLS-SRP and set the path to the OpenSSL SRP verifier
  137. #   file (containing login information for SRP user accounts).
  138. #   Requires OpenSSL 1.0.1 or newer. See the mod_ssl FAQ for
  139. #   detailed instructions on creating this file. Example:
  140. #   "openssl srp -srpvfile ${SRVROOT}/conf/passwd.srpv -add username"
  141. #SSLSRPVerifierFile "${SRVROOT}/conf/passwd.srpv"
  142. #   Access Control:
  143. #   With SSLRequire you can do per-directory access control based
  144. #   on arbitrary complex boolean expressions containing server
  145. #   variable checks and other lookup directives.  The syntax is a
  146. #   mixture between C and Perl.  See the mod_ssl documentation
  147. #   for more details.
  148. #<Location />
  149. #SSLRequire (    %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \
  150. #            and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \
  151. #            and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \
  152. #            and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \
  153. #            and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20       ) \
  154. #           or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/
  155. #</Location>
  156. #   SSL Engine Options:
  157. #   Set various options for the SSL engine.
  158. #SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
  159. <FilesMatch "\.(cgi|shtml|phtml|php)$">
  160.     SSLOptions +StdEnvVars
  161. </FilesMatch>
  162. <Directory "${SRVROOT}/cgi-bin">
  163.     SSLOptions +StdEnvVars
  164. Options Indexes FollowSymLinks MultiViews
  165. AllowOverride All
  166. Order allow,deny
  167. allow from all
  168. </Directory>
  169. #   SSL Protocol Adjustments:
  170. #   The safe and default but still SSL/TLS standard compliant shutdown
  171. #   approach is that mod_ssl sends the close notify alert but doesn't wait for
  172. #   the close notify alert from client. When you need a different shutdown
  173. #   approach you can use one of the following variables:
  174. #   "force-response-1.0" for this.
  175. BrowserMatch "MSIE [2-5]" \
  176.          nokeepalive ssl-unclean-shutdown \
  177.          downgrade-1.0 force-response-1.0
  178. #   Per-Server Logging:
  179. #   The home of a custom SSL log file. Use this when you want a
  180. #   compact non-error SSL logfile on a virtual host basis.
  181. CustomLog "***************/apache2.4.41/conf/ssl/logs/ssl_request.log" \
  182.           "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
  183. </VirtualHost>


mood
Publicité
Posté le 23-06-2023 à 10:56:20  profilanswer
 


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Réseaux grand public / SoHo
  Réseaux

  Passer WAMPSERVER en HTTPS

 

Sujets relatifs
Passer d'ADSL à FTTH à la maisonConseil - Rester chez Bouygues ou passer chez Orange
Quelle certification cisco passerPasser un petit local professionnel de l'adsl à la fibre
Remplacement d'une Box par une autre sans passer par le FAINginx et problème https
faire passer signal télé (cable) sur reseau ethernet ou via CPL[Besoin d'aide] Je vais devoir passer en Wi-Fi
Se passer du routeur Bouygues... Problèmes de QoS.[Résolu] - Cable ethernet qui ne laisse passer que le téléphone
Plus de sujets relatifs à : Passer WAMPSERVER en HTTPS


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR