WampServer 打造 https 站(上) 图文详解
来源:互联网 发布:mac版酷狗音乐传歌 编辑:程序博客网 时间:2024/05/17 05:08
1 .声明
我的wampserver 路径 是 C:\wamp
wampserver 的版本是 WampServer Version 2.5
Apach 的版本是 2.4.9
操作系统是 win10;
本机局域网id 192.168.31.108
步骤
1. 把 C:\wamp\bin\apache\apache2.4.9\bin
的 ssleay32.dll,libeay32.dll ,openssl.exe三个文件复制到 C:\Windows\System32这个目录下。
2. 生成服务器证书
打开cmd 命令行 输入
跳转到 cd C:\wamp\bin\apache\apache2.4.9\bin 回车
输入
openssl req -new -out server.csr -config ../conf/openssl.cnf
按回车键
输入 whatisjava
按回车键
输入 whatisjava
按回车键
输入 CN
按回车键
输入CHONGQING
按回车键
输入CHONGQING
按回车键
输入CHONGQING
按回车键
输入CHONGQING
按回车键
输入你的域名 或者服务器ip 我的是本地测试 输入我服务器ip
按回车键
输入你的邮箱
按回车键
输入whatisjava
按回车键
二次输入whatisjava
如图
这时候 C:\wamp\bin\apache\apache2.4.9\bin 生成了2个文件
privkey.pem ,server.csr 2个文件。
然后 在C:/wamp/bin/apache/apache2.4.9/ 下面创建一个ssh 文件夹 并生成的2个文件拷贝进去
生成私匙
输入 openssl rsa -in privkey.pem -out server.key
按回车
输入whatisjava
按回车键
没报错 恭喜你就成功了
创建证书 server.crt
输入
openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 365
按回车
出现ok 就成功了
在 C:\wamp\bin\apache\apache2.4.9\bin 目录下 找到
刚刚生成 server.key 和 server.csr 并复制到 刚刚建立的那个ssh 文件夹里面 也就是C:\wamp\bin\apache\apache2.4.9\ssh 这个目录下面
此时的目录机构
证书生成好了 下一步就是 修改配置文件了
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 ….
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: . 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
- WampServer 打造 https 站(上) 图文详解
- wampserver 打造https 站点(下)
- wampServer图文详细配置
- WampServer启用https
- wampserver部署https服务器
- Flex同Java通信--BlazeDS入门图文详解(上)
- Flex同Java通信--BlazeDS入门图文详解(上)
- HTTPS证书颁发机构Startssl SSL申请图文详解
- wampserver 配置详解
- 为Wampserver中的apache配置https协议
- centos7上win2003 virtio (openstack)镜像制作成功(图文详解)
- x264代码剖析(一):图文详解x264在Windows平台上的搭建
- HTTPS知识整理(上)
- 利用腾讯云免费证书打造全https站
- wampserver 上 phalcon安装 配置
- 在Win2003上安装WampServer
- Wampserver 上 phalcon安装 配置
- 计算机网络体系结构详解(图文)
- solr5.3.1搭建
- Linux文件操作命令
- 【LWJGL官方教程】批渲染
- JAVA-享元设计模式
- Android Studio——android中minLines和maxLines的区别
- WampServer 打造 https 站(上) 图文详解
- javascript基本学习
- 递归基础练习2
- android中的网络请求(以注册登陆为例)
- 欢迎使用CSDN-markdown编辑器
- 【学习】Javascript设计模式——Constructor构造器模式
- Java中 /** */注释和 /* */注释 的区别
- qt用mingw编译时报错 multiple definition of
- Android仿QQ长按删除弹出框