`
seven.yu
  • 浏览: 34428 次
  • 性别: Icon_minigender_2
  • 来自: 沈阳
社区版块
存档分类
最新评论

wampserver2 配置ssl 经过验证 可用

阅读更多
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.



Edited 11 time(s). Last edit at 11/25/2008 08:34PM by hambuler.
分享到:
评论

相关推荐

    WampServer安装包及配置图解

    **WampServer安装包及配置图解** WampServer是一款集成的Windows环境下Web开发环境,它包含Apache服务器、PHP解释器以及MySQL数据库。这个安装包是版本2.2e,其中包含了Apache 2.2.22、PHP 5.4.3和MySQL 5.5.24,...

    WampServer2.1 配置说明

    ### WampServer2.1配置详解 #### 一、概述 WampServer 是一款非常流行的 Windows 下集成开发环境,它集成了Apache、MySQL 和 PHP,为开发者提供了方便快捷的开发平台。本文主要针对WampServer2.1版本,详细介绍...

    WAMPSERVER2.1配置说明[归纳].pdf

    WAMPSERVER2.1配置说明[归纳].pdf

    wampserver2.2d配置手册

    ### WampServer 2.2d 配置详解 #### 安装与基本设置 WampServer是一款在Windows环境下集成了Apache、MySQL和PHP的Web开发环境,它为开发者提供了快速搭建本地Web服务器的能力。安装过程较为直观,只需跟随安装向导...

    WampServer2-PHP5211

    在WampServer2中,Apache被预配置为方便地与PHP和MySQL集成,使得开发者可以快速设置本地开发环境。 2. **PHP5.2.11**:PHP(Hypertext Preprocessor)是一种广泛使用的开源脚本语言,尤其适合Web开发。版本5.2.11...

    WampServer5 配置图

    ### WampServer5 配置详解 #### 一、概述 WampServer是一款集成了Apache Web服务器、PHP解释器及MySQL数据库的免费软件包,专为Windows操作系统设计。该软件包极大地方便了开发者在本地环境中搭建Apache Web ...

    wampserver和多站点配置文件

    除了基本配置,WampServer还支持更高级的特性,如SSL/TLS加密、URL重写、自定义错误页面等。熟悉这些配置能够提升你的Web开发效率,同时保证项目的安全性和专业性。如果你遇到任何问题,WampServer的官方文档和社区...

    WampServer2.X配置sqlsrv sql2005最新php5.3版本

    在开始配置之前,确保已安装了WampServer 2.X。你可以从官方或者其他可信源下载安装包,按照向导完成安装。安装完成后,图标应该出现在系统托盘区域,双击可以启动或停止服务。 2. **获取sqlsrv扩展** 由于sqlsrv...

    wampserver zend的debug详细配置教程

    WampServer Zend 调试配置详细教程 在本教程中,我们将详细介绍如何在 WampServer 环境中配置 Zend 调试工具,以便进行远程调试。 标题解析 WampServer 是一个流行的 Windows 平台上的集成开发环境,提供了 ...

    WampServer2网站开发集成安装

    Apache是世界上最流行的Web服务器软件之一,WampServer2中的Apache配置简单,可以方便地调整端口、虚拟主机等设置。通过WampServer2,你可以直接在Windows环境下启动和停止Apache服务,无需深入理解复杂的命令行操作...

    wampserver2.x版本,包含window平台的32位和64位

    2. **Apache**:Apache HTTP Server是世界上最流行的Web服务器软件之一,WampServer包含的Apache版本已经预配置好,与PHP和MySQL完美集成,使得开发者可以直接使用。你可以通过WampServer管理界面轻松控制Apache的...

    WampServer-SSL-Auto-Config:WampServer SSL Auto Config是一个Microsoft Windows批处理脚本,旨在自动生成和配置完全正常工作的基于Apache SSL Name的虚拟主机开发环境

    WampServer SSL自动配置 WampServer SSL Auto Config是一个Microsoft Windows批处理脚本,旨在自动生成和配置具有可选HTTP / 2功能的,可正常运行的Apache SSL /基于名称的虚拟主机开发环境。目录开发领域如何使用...

    wampserver

    2. **启动与配置**: 安装完成后,WampServer的图标将出现在系统托盘区。单击图标可以启动、停止服务,更改服务器设置,如端口、目录等。 3. **项目管理**: 在`www`目录下,你可以创建自己的Web项目。WampServer会将...

    wampserver配置详细图解

    ### WampServer配置详解 #### 一、WampServer简介及安装 WampServer是一款集成了Apache Web服务器、PHP解释器以及MySQL数据库的综合开发工具包。它的主要优点在于简化了开发环境的搭建过程,使得开发者能够更加...

    php discuz 集成开发环境配置用WampServer2.0搭建Discuz!

    ":这个标题清晰地指出了文章的主题——如何使用WampServer 2.0来配置一个用于Discuz!的集成开发环境。 - **描述**:"用WampServer2.0搭建Discuz!":进一步明确了文章的核心内容是介绍如何通过WampServer 2.0搭建...

    PHP-wampServer-phpStorm-xdebug配置指南图文介绍.doc

    1. 环境配置 2 2. 项目源码配置 2 代码放置 2 数据库放置 2 3. 网页访问 2 注意事项: 2 4. 局域网访问 4 第一步:找到 conf 这个文件: 4 第二步:找到 httpd-vhosts.conf 这个文件: 5 5. PhpStorm 配置服务器...

    wampserver如何配置

    以下是如何配置WampServer的详细步骤: 1. 安装WampServer:首先,你需要从官方网站下载最新版本的WampServer安装包,并按照提示进行安装。在安装过程中,注意选择适合自己电脑系统位数的版本(32位或64位)。 2. ...

    wampserver3.1.7.zip

    免去了开发人员将时间花费在繁琐的配置环境过程,从而腾出更多精力去做开发。 WampServer就是Windows Apache Mysql PHP集成安装环境,即在Windows操作系统下的apache、php和mysql的服务器软件。

    WampServer配置图解

    WampServer的安装和配置相对简单,能够大大节约开发者配置服务器环境的时间。 首先,在安装WampServer之前,需要确保本机上没有安装过WampServer,以及卸载掉任何已经安装的Apache、PHP或MySQL,避免端口冲突导致...

Global site tag (gtag.js) - Google Analytics