本文原地址

http://blog.csdn.net/taosst/article/details/2182966

http://forum.wampserver.com/read.php?2,32986,page=1 
起初openssl总提示 无法定位 ssleay32.dll 
把别的版本apache下的openssl.exe考过来覆盖 就无问题了 原因未知 
Wamp2 HTTPS and SSL Setup Step-by-Step guide 
Posted by: hambuler (---.cpe.net.cable.rogers.com) 
Date: March 08, 2008 08:54PM

You can follow my guided steps to create working https SSL:

**************** 
****Step1****** -> Create SSL Certificate and Key 
****************

1a) Open the DOS command window and change directory to bin directory of wamp apache directory by using the DOS command without quotes: "cd /d c:\" and then "cd wamp\bin\apache\apache2.2.8\bin". apache2.2.8 should be changed to what apache folder your wamp server has.

After done, the DOS prompt should look like: C:\wamp\bin\apache\apache2.2.8\bin>

1b) Create a server private key with 1024 bits encryption. You should enter this command without quotes: 
"openssl genrsa -des3 -out server.key 1024". It'll ask you a pass phrase (password), just enter any password you like ' 
1c) Remove the pass phrase from the RSA private key (while keeping a backup copy of the original file). Enter this command without quotes: "copy server.key server.key.org" and then "openssl rsa -in server.key.org -out server.key". It'll ask you the pass phrase, just type it.

1d) Create a self-signed Certificate (X509 structure) with the RSA key you just created. Enter the command without quotes: "openssl req -new -x509 -nodes -sha1 -days 365 -key server.key -out server.crt -config C:\wamp\bin\apache\apache2.2.8\conf\openssl.cnf".

You might combine step1b, 1c and 1d into one step by using this command, no quotes: "openssl req -new -x509 -nodes -out server.crt -keyout server.key" if you have trouble following through.

You'll fill in the information after entering this command. The correct location of config file, openssl.cnf may need to be changed. In windows, you won't see ".cnf" extension of the file openssl, but in DOS you'll see the full name openssl.cnf.

1e) Create a real SSL server certifcate (Optional): if you don't want step 1a to 1d 
A. Create a server RSA private key for your Apache server (Triple-DES encrypted and PEM formatted): 
Type command: openssl genrsa -des3 -out server.key 1024

You might keep the backup of server private key in a maximum secure place and guard it well (e.g 
your digital wallet).

B. Create a Certificate Signing Request (CSR) for public (output will be PEM 
formatted). A CSR is a file containing your certificate application information, including your Public 
Key. Generate your CSR and then copy and paste the CSR file into the webform in the enrollment 
process at your certificate authority website:

Type the command: openssl req -new -key server.key -out server.csr

You will now be asked to enter details to be entered into your CSR. What you are about to enter 
is what is called a Distinguished Name or a DN. For some fields there will be a default value, If you 
enter '.', the field will be left blank. Use the name of the webserver as Common Name (CN). If the 
domain name (Common Name) is mydomain.com append the domain to the hostname (use the 
fully qualified domain name).

Depending on a specific certifying authority (CA) you might have to enter the details as specified by 
them. Normally, the CA authority will provide specific instructions for you.

C. Now all you have to do is sending this Certificate Signing Request (CSR) to a Certifying Authority 
(CA) to be signed. A trusted CA means all major web browsers recognize it without giving you a 
warning when you install your CA-signed SSL certificate on your webserver. Once the CSR has been 
signed, you will have a REAL Certificate, which can be used by Apache. You can have a CSR signed 
by a commercial CA (fees are required). Then they will send you the signed certificate which you 
can store in a server.crt file 
D. Once, your CSR certificate has been signed and returned to you, you can view the details by using 
this command: openssl x509 -noout -text -in server.crt

**************** 
***** Step2***** -> Copy the server.key and server.crt files. 
****************

2a) In the conf folder of apache2.2.8 folder, create two folders named as ssl.key and ssl.crt

2b) copy the server.key file to ssl.key folder and server.crt file to ssl.crt

**************** 
****Step3****** -> Edit the httpd.conf file and php.ini 
****************

3a) In httpd.conf file, remove the comment '#' at the line which says: LoadModule ssl_module 
modules/mod_ssl.so

3b) In httpd.conf, remove the comment '#' at the line which says: Include 
conf/extra/httpd_ssl.conf 
Then move that line after this block <IfModule ssl_module>.... </IfModule>

3c) open the php.ini file located in apache2.2....\bin folder, remove the comment ';' at the line 
which says: extension=php_openssl.dll

*************** 
****Step4***** -> Edit the httpd_ssl.conf file in the folder name, extra 
***************

4a) Find the line which says "SSLMutex ...." and change it to "SSLMutex default" without quotes

4b) Find the line which says: <VirtualHost _default_:443>. Right after it, change the line which says "DocumentRoot ..." to DocumentRoot "C:/wamp/www/" with quotes. Change the line "ErrorLog...." to Errorlog logs/sslerror_log. Change the line "TransferLog ...." to TransferLog logs/sslaccess_log

4c) SSL crt file: Change the line "SSLCertificateFile ...." to SSLCertificateFile "conf/ssl.crt/server.crt"

4d) SSL key file: Change the line "SSLCertificateKeyFile ...." to SSLCertificateKeyFile "conf/ssl.key/server.key"

4e) Change the line which says <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin"> or something similar to <Directory "C:/wamp/www/"> and add the following lines inside those <Directory ... >...</Directory> tags:

Options Indexes FollowSymLinks MultiViews 
AllowOverride All 
Order allow,deny 
allow from all

4f) Make sure the line CustomLog "logs/ssl_request_log" \ 
is uncommented (remove the #). This step is suggested by wmorse1.

************** 
****Step5**** In the previous DOS Command windows, enter httpd -t . If it displays Sysntax is OK, then 
************** go to Step 6. If not, then correct the wrong syntax and redo step 5.

************** 
****Step6***** -> Restart the Apache server 
***************

************** 
****Step7**** -> if restart is successful, then open the browser and enter "[localhost"]; without 
************** quotes.

************************* 
****Step8 (Optional)**** -> If you want to allow world wide web access to your HTTPS secure server, then 
************** ********** in the httpd_ssl.conf file, change the line which says 'ServerName localhost:443' to 'ServerName www.yourwebsitename.com:443' without quotes. yourwebsitename is your registered internet domain name. If you don't have it, then just use your WAN IP address. For example 'ServerName 99.238.53.105:443'. Make sure these setups are correct to allow outside access to secured www server.

8.a The DocumentRoot you modified in step 4b points to the correct website folder on your 
computer.

8.b If your computer's connected to the router, setup the router to allow port 443 forwarding to your 
computer.

8.c If your computer has a firewall enabled or behind a network firewall, set up the firewall to allow 
incoming port 443 connection.

wampserver2 配置ssl 经过验证 可用的更多相关文章

  1. nginx配置ssl双向验证 nginx https ssl证书配置

    1.安装nginx 参考<nginx安装>:http://www.ttlsa.com/nginx/nginx-install-on-linux/ 如果你想在单IP/服务器上配置多个http ...

  2. 轻松把玩HttpClient之配置ssl,采用绕过证书验证实现https

    上篇文章说道httpclient不能直接访问https的资源,这次就来模拟一下环境,然后配置https测试一下.在前面的文章中,分享了一篇自己生成并在tomcat中配置ssl的文章<Tomcat ...

  3. 配置Tomcat使用https协议(配置SSL协议)

    配置Tomcat使用https协议(配置SSL协议) 2014-01-20 16:38 58915人阅读 评论(3) 收藏 举报 转载地址:http://ln-ydc.iteye.com/blog/1 ...

  4. TOMCAT配置SSL认证为HTTPS协议服务

     1 . 问题概述 很多安全性要求较高的系统,都会使用安全套接字层(SSL)进行信息交换, Sun为了解决在Internet上的实现安全信息传输的解决方案.它实现了SSL和TSL(传输层安全)协议 ...

  5. 【转】配置Tomcat使用https协议(配置SSL协议)

    转载地址:http://ln-ydc.iteye.com/blog/1330674 内容概览: 如果希望 Tomcat 支持 Https,主要的工作是配置 SSL 协议 1.生成安全证书 2.配置to ...

  6. Python升级后ssl模块不可用问题解决和浅析

    在Cent0S 7.5下将Python 2.7.5升级到Python 3.6.6后,发现ssl模块不可用,具体详细信息如下所示: [root@db-server ~]# pip list Packag ...

  7. nginx配置ssl

    1.使用pfx证书配置ssl (http://www.heartlifes.com/archives/12/) .上传证书 .生成证书crt及key文件 openssl pkcs12 -in /usr ...

  8. 单点登录CAS使用记(一):前期准备以及为CAS-Server配置SSL协议

    知识点: SSO:单点登录(Single Sign On),是目前比较流行的企业业务整合的解决方案之一.SSO的定义是在多个应用系统中,用户只需要登录一次就可以访问所有相互信任的应用系统. CAS:耶 ...

  9. 为ownCloud配置SSL连接

    为ownCloud配置SSL连接 在你开始使用ownCloud之前,强烈建议你在ownCloud中启用SSL支持.使用SSL可以提供重要的安全好处,比如加密ownCloud流量并提供适当的验证.在本教 ...

随机推荐

  1. 钩子编程(HOOK) 安装进程内键盘钩子 (1)

    摘要:钩子能够监视系统或进程中的各种事件消息.截获发往目标窗体的消息并进行处理.这样,我们就能够在系统中安装自己定义的钩子,监视系统中特定事件的发生.完毕特定的功能,比方截获键盘.鼠标的输入.屏幕取词 ...

  2. 跟我一起写 Makefile(二)[转]

    原文链接 http://bbs.chinaunix.net/thread-408225-1-1.html(出处: http://bbs.chinaunix.net/) 一.Makefile里有什么? ...

  3. NFS网络文件系统服务(配置实战)

    NFS网络文件系统服务(实战) NFS(Network File System)即网络文件系统,它允许网络中的计算机之间通过TCP/IP网络共享资源.让不同的主机系统(NFS的客户端)可以透明地读写位 ...

  4. Maven学习----Dependency scope

    首先官网API 2.09版本之后,有6中scope. Dependency scope 用来限制依赖的作用范围,同时也作用于各种编译路径类路径,下面详细说明这六种路径: compile这是默认范围,C ...

  5. Java线程—-Runnable和Callable的区别和联系

    Java 提供了三种创建线程的方法 1.继承Thread接口 public class Thread2Thread { public static void main(String[] args) { ...

  6. Lumen开发:结合Redis实现消息队列(2)

    上一篇讲了Lumen配置Redis,现在来讲一下,如何实现消息队列 2.编写任务类 2.1  任务类结构 默认情况下,应用的所有队列任务都存放在app/Jobs目录.任务类非常简单,正常情况下只包含一 ...

  7. wxwidget自定义消息处理步骤

    from http://www.cppblog.com/kenlistian/archive/2009/02/06/73096.html 略有修改 wxwidget自定义消息处理步骤 自定义消息处理( ...

  8. 九度OJ 1251:序列分割 (DFS)

    时间限制:1 秒 内存限制:32 兆 特殊判题:否 提交:166 解决:34 题目描述: 一个整数数组,长度为n,将其分为m份,使各份的和相等,求m的最大值   比如{3,2,4,3,6} 可以分成{ ...

  9. VS2017生成类库选择Release失效的问题

    VS的生成可以选择Debug模式或者Release模式,但是我发现在配置里面选择Release无效. 后来发现应该 在 生成->配置管理器  里面设置.

  10. css3 transition效果

    <meta charset="UTF-8"> <style> .btn { display: inline-block; font-size: 12px; ...