# -------------------------------------- # # Module SSL # # -------------------------------------- # #LoadModule ssl_module modules/mod_ssl.so #LoadModule socache_shmcb_module modules/mod_socache_shmcb.so <IfModule ssl_module> SSLProtocol -ALL +SSLv3 +TLSv1 # SSLRandomSeed startup builtin SSLRandomSeed connect builtin # SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5 SSLCipherSuite ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM # SSLPassPhraseDialog builtin # SSLPassPhraseDialog "exec:f:/Wamp/bin/apache/apache2.4.9/conf/Crt/passphrase.txt" # SSLSessionCache "none" SSLSessionCacheTimeout 300 </IfModule>
# =============================== # # # # Les Adresses IP & Ports # # # # =============================== # Listen 80 http # <IfModule ssl_module> listen [::1]:443 https </IfModule>
# -------------------------- # # Localhost avec SSL # # -------------------------- # <IfModule ssl_module> <VirtualHost [::1]:443> ServerName localhost ServerAdmin artemus24@live.fr DocumentRoot "f:/Wamp/www/" # ErrorLog "f:/Wamp/www/Logs/error.log" # SSLEngine on SSLCertificateFile "f:/wamp/bin/apache/apache2.4.9/conf/Crt/localhost.crt" SSLCertificateKeyFile "f:/wamp/bin/apache/apache2.4.9/conf/Key/localhost.key" # <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> # <Directory /> SSLOptions +StdEnvVars Options -Indexes +FollowSymLinks +MultiViews AllowOverride none Require local </Directory> # BrowserMatch "MSIE [2-5]" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0 CustomLog "f:/wamp/www/Logs/custom.log" "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" </VirtualHost> </IfModule> # -------------------------- # # Localhost sans SSL # # -------------------------- # <IfModule !ssl_module> <VirtualHost [::1]:80> ServerName localhost ServerAdmin artemus24@live.fr DocumentRoot "f:/Wamp/www/" # ErrorLog "f:/Wamp/www/Logs/error.log" CustomLog "f:/Wamp/www/Logs/custom.log" common # <Directory /> Options -Indexes +FollowSymLinks +MultiViews AllowOverride none Require local </Directory> </VirtualHost> </IfModule>Il y a deux parties, l'une avec le protocole "https" (le port 443) pour accéder au site "localhost" et l'autre sans (le port 80).