apache 配置https
1、生成密钥
# openssl genrsa 1024 > server.key
这是用128位rsa算法生成密钥,并保存到server.key文件
2、生成证书请求文件
# openssl req -new -key server.key > server.csr
Country Name (2 letter code) [GB]:CN
State or Province Name (full name) [Berkshire]:Zhejiang
Locality Name (eg, city) [Newbury]:Hangzhou
Organization Name (eg, company) [My Company Ltd]:My Application
Organizational Unit Name (eg, section) []:My Application
Common Name (eg, your name or your server's hostname) []:www.www.com
Email Address []:
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:My Application
3、生成证书
# openssl req -x509 -days 730 -key server.key -in server.csr > server.crt
参数-days表示证书有效期
至此证书完毕,开始配置httpd,因为已经在运行httpd
httpd重新编译追加ssl:
1、重新编译
make clean
make clean all
./configure --prefix=/usr/local/apache2 --enable-so --enable-mods-shared=most --enable-ssl &&
make &&
make install
2、编辑httpd.conf文件,添加
LoadModule ssl_module modules/mod_ssl.so
3、加载ssl配置
Include conf/httpd-ssl.conf
4、注意修改证书配置
SSLCertificateFile /apache/conf/server.crt
SSLCertificateKeyFile /apache/conf/server.key
5、因为自定义了DocumentRoot,所以也要修改httpd-ssl.conf的DocumentRoot
起来后发现日志里总是有以下错误:
[notice] caught SIGTERM, shutting down
[Wed Mar 26 21:53:02 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Mar 26 21:53:02 2014] [warn] RSA server certificate CommonName (CN) `serv' does NOT match server name!?
apache 配置https的更多相关文章
- Apache配置HTTPS功能
apache配置https 一.yum 安装openssl和openssl-devel,httpd-devel 二.生成证书(也可以从公司的证书颁发机构获取): #建立服务器密钥 openssl ge ...
- Windows上为Apache配置HTTPS
Windows上为Apache配置HTTPS 转 https://www.cnblogs.com/tianzijiaozi/p/7582671.html 1. 安装OpenSSL: Windo ...
- Linux下Apache配置HTTPS功能
Apache配置HTTPS功能 转 https://www.cnblogs.com/liaojiafa/p/6028816.html 一.yum 安装openssl和openssl-devel,ht ...
- Apache配置https
Apache配置https 之前一直用的是Tomcat,今天突然接到任务要给Apache配置https证书,因为小程序要用.下面把过程列出来以备后续查看. 1.首先你得有ssl证书,没有的可以去购买, ...
- 在linux下的apache配置https协议,开启ssl连接
环境:linux 配置https协议,需要2大步骤: 一.生成服务器证书 1.安装openssl软件 yum install -y openssl mod_ssl 2.生成服务器私匙,生成server ...
- apache 配置https(转)
主要讲述在windows下apache配置SSL以实现http转换为https SSL: SSl是为Http传输提供安全的协议,通过证书认证来确保客户端和网站服务器之间的数据是安全.也就是说在SSL下 ...
- lamp之apache配置https访问
配置apache 使用https 注:怕其他人由于路径的原因出问题,首先声明一下,本人apache的安装目录为 : /usr/local/httpd2.4.25,如果不是,请参考进行配置 注: 对于如 ...
- Linux Apache配置https访问
配置https访问 该环境是rh254课程配套的一个环境,不过配置方法步骤相同. 要求: 使用虚拟主机技术部署两个网站: 网站1: 绑定域名 www0.example.com 目录在 /srv/www ...
- Apache 配置Https 转发Tomcat Http
Apache 相对于nginx的配置对比起来相当复杂啦,朋友之前的系统使用的是Apache需要增加一个虚拟主机,主要配置从Apache转发Tomcat. 首先需要拆解下步骤: Apache 支持Htt ...
- apache配置https协议
安装openssl有两种方式,第一种直接下载安装包,装上就可运行:第二种可以自己下载源码,自己编译.下面对两种方式均进行详细描述. 一.下载和安装openss 方法一:直接使用openssl安装包 W ...
随机推荐
- The storage wars: Shadow Paging, Log Structured Merge and Write Ahead Logging
The storage wars: Shadow Paging, Log Structured Merge and Write Ahead Logging previous: Seek, and yo ...
- WP8.1 Study18:动态磁贴
一.前言 动态磁贴在WindowsPhone8.1和Windows8.1都是其特色,有人喜欢有人讨厌,不过我觉得还是挺好的,可以让使用者很快知道App内的内容和吸引使用者打开App.下面来学习下怎样添 ...
- 当powershell遇上mysql引发的血案
------------------[故事来由]------------------ 起因:群友问:把cmd.exe /c a:\mysql5.6\bin\mysql.exe -uroot < ...
- PHP日志扩展 SeasLog-1.6.8, 性能更优
SeasLog-1.6.8 发布了,性能更优. 改进日志: 1.6.8: 优化内存使用和性能,修复已知Bug. - Fixed issue #97 PHP5.* Cached Block. - Fix ...
- R on Ubuntu
I have been using R recently. R is statistics programming language. R has attracted more and more at ...
- 搭建Android工程的步骤及其第一个安卓程序
1.安卓系统架构 1>底层是Linux系统 2>函数库层 由C或C++写的 3>Application frameWork应用的框架层 4>顶层是应用层 2.JVM与DVM介绍 ...
- Cloudera-Manager修改集群的IP
1.业务需求说明:由于公司网络进行了整改,随之而来的就是对应的ip网段发生了变化,其中我的hadoop的集群各主机的ip也相应的发生了改变,因此需要对各主机进行修改ip. 2.具体操作: 首先停止cd ...
- DOM扩展之Selectors API
jQuery的核心就是通过CSS选择符查询DOM文档取得元素的引用,从而抛开了getElementById()和getElementsByTagName(). Selectors API致力于让浏览器 ...
- C++ 构造与析构函数
这两个概念并不对等,构造函数可以完全控制成员构造过程(通过初始化列表),析构函数准确说应该叫析构之前被调用的函数 一般不应该手动调用析构函数:栈区对象会自动析构,堆区也是在delete的时候析构 有一 ...
- C++ Daily 《3》----构造函数可否是虚函数
C++ 中构造函数可否是虚函数? 绝不要!! 而且,在构造函数中调用虚函数也是不提倡的行为,因为会引发预想不到的结果. 因为,在 derived class 对象构造的过程中,首先调用的是基类的构造函 ...