生成apache证书(https应用)
-
# cd /usr/local/apache2/conf
# tar zxvf ssl.ca-0.1.tar.gz
# cd ssl.ca-0.1
生成根证书:
# ./new-root-ca.sh (生成根证书)
No Root CA key round. Generating one
Generating RSA private key, 1024 bit long modulus
...........................++++++
....++++++
e is 65537 (0x10001)
Enter pass phrase for ca.key: (输入一个密码)
Verifying - Enter pass phrase for ca.key: (再输入一次密码)
......
Self-sign the root CA... (签署根证书)
Enter pass phrase for ca.key: (输入刚刚设置的密码)
........
........ (下面开始签署)
Country Name (2 letter code) [MY]:CN
State or Province Name (full name) [Perak]:HaiNan
Locality Name (eg, city) [Sitiawan]:HaiKou
Organization Name (eg, company) [My Directory Sdn Bhd]:Wiscom System Co.,Ltd
Organizational Unit Name (eg, section) [Certification Services Division]:ACSTAR
Common Name (eg, MD Root CA) []:WISCOM CA
Email Address []:acmail@wiscom.com.cn这样就生成了ca.key和ca.crt两个文件,下面还要为我们的服务器生成一个证书:
生成server证书:
# ./new-server-cert.sh server (这个证书的名字是server)
......
......
Country Name (2 letter code) [MY]:CN
State or Province Name (full name) [Perak]:HaiNan
Locality Name (eg, city) [Sitiawan]:HaiKou
Organization Name (eg, company) [My Directory Sdn Bhd]:Wiscom System Co.,Ltd
Organizational Unit Name (eg, section) [Secure Web Server]:ACSTAR
Common Name (eg, www.domain.com) []:acmail.wiscom.com.cn
Email Address []:acmail@wiscom.com.cn这样就生成了server.csr和server.key这两个文件。
签署server证书:
# ./sign-server-cert.sh server
CA signing: server.csr -> server.crt:
Using configuration from ca.config
Enter pass phrase for ./ca.key: (输入上面设置的根证书密码)
Check that the request matches the signature
Signature ok
The Subject's Distinguished Name is as follows
countryName :PRINTABLE:'CN'
stateOrProvinceName :PRINTABLE:'JiangSu'
localityName :PRINTABLE:'NanJing'
organizationName :PRINTABLE:'Wiscom System Co.,Ltd'
organizationalUnitName:PRINTABLE:'ACSTAR'
commonName :PRINTABLE:'acmail.wiscom.com.cn'
emailAddress :IA5STRING:'acmail@wiscom.com.cn'
Certificate is to be certified until Jul 16 12:55:34 2005 GMT (365 days)
Sign the certificate? [y/n]:y
1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
Data Base Updated
CA verifying: server.crt <-> CA cert
server.crt: OK
(如果这里出现错误,最好重新来过,删除ssl.ca-0.1这个目录,从解压缩处重新开始。)下面要按照ssl.conf里面的设置,将证书放在适当的位置。
# chmod 400 server.key
# cd ..
# mkdir ssl.key
# mv ssl.ca-0.1/server.key ssl.key
# mkdir ssl.crt
# mv ssl.ca-0.1/server.crt ssl.crt然后就可以启动啦!
# cd /usr/local/apache2
# ./bin/apachectl startssl---------------------------------------------------------------------------------------------------------
//安装apache扩展
yum -y install httpd-manual mod_ssl mod_perl mod_auth_mysql//安装php扩展
yum -y install php-gd php-xml php-mbstring php-ldap php-pear//安装mysql扩展
yum -y install mysql-connector-odbc mysql-devel libdbi-dbd-mysql
生成apache证书(https应用)的更多相关文章
- 全部用startssl生成的证书,配置Apache使其支持SSL
Apache的编译安装见这篇: http://www.cnblogs.com/yjken/p/3921840.html 网上查阅了一大批资料,得知自己生成的证书是会被浏览器提示“证书不安全”的,我也就 ...
- apache添加https证书
今天折腾了一下,总结apache添加https证书的方法. 证书类型分为两种, A)自签名证书 利用oepnssl命令生成.csr和key文件,没有授信,没有有效期,但是可以强制使用https协议,可 ...
- 自己生成nginx的https证书
#自己生成ssl证书 这里说下Linux 系统怎么通过openssl命令生成 证书. 首先执行如下命令生成一个key openssl genrsa -des3 -out ssl.key 1024 然后 ...
- Ubuntu下配置apache开启https
一.HTTPS简述随着网络的日常,信息安全越来越重要,传统的网站都是http协议明文传输,而HTTPS协议是由SSL+HTTP协议构建的可进行加密传输.身份认证的网络协议,比http协议安全. 那ht ...
- 腾讯云CentOS Apache开启HTTPS
1.申请SSL证书 https://console.qcloud.com/ssl?utm_source=yingyongbao&utm_medium=ssl&utm_campaign= ...
- CentOS 6下Apache的https虚拟主机实践
题目:1.建立httpd服务器,要求: 提供两个基于名称的虚拟主机: (a)www1.buybybuy.com,页面文件目录为/web/vhosts/www1:错误日志为/var/log/httpd/ ...
- Apache配置HTTPS功能
apache配置https 一.yum 安装openssl和openssl-devel,httpd-devel 二.生成证书(也可以从公司的证书颁发机构获取): #建立服务器密钥 openssl ge ...
- windows下apache配置https
1.下载带有openSSL的apache安装包,我下载的为apache_2.2.11-win32-x86-openssl-0.9.8i.msi,安装后确认一下bin路径下的openssl.exe,ss ...
- 在linux下的apache配置https协议,开启ssl连接
环境:linux 配置https协议,需要2大步骤: 一.生成服务器证书 1.安装openssl软件 yum install -y openssl mod_ssl 2.生成服务器私匙,生成server ...
随机推荐
- QComboBox
#include "dialog.h" #include "ui_dialog.h" #include <QtCore> #include < ...
- CodeTimer
using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using S ...
- mkdir
1,mkdir Problem: You want to use the mkdir() function from the sys/stat.h POSIX header, but you don’ ...
- 英特尔15天开发IDF硬享公社App全过程
4月8日英特尔智能硬件大赛在上海决赛,4月13日英热尔智能硬件大赛10强在深圳首秀.英特尔辗转两大城市来顾全两地智能硬件创业者,移动直播就成了用户们最重要的观看渠道. 这次英特尔两大会事现场直播都在官 ...
- AngularJs赋值问题
$scope.showUpgradeForm = function(item){ $scope.upgrade = item; $scope.upgrade.vercode++; // 其它操作 } ...
- Python模块(json)
json json模块,用来处理json风格的数据 一.json的数据格式 json是javascripts的标准格式,json的格式是由若干个 键/值(key,values) 对的集合,该集合可以理 ...
- python判断类型
方法 isinstance(obj, type) 示例 >>> print isinstance(, int) True >>> print isinstance( ...
- javascript原生dom操作方法
一.节点层次属性 考虑空白符的相关层次关系属性: 1.childNodes属性 包含 2.parentNode属性 3.previouseSibling属性和nextSibling属性 4.first ...
- 论--如何通过代码解析plist文件创建对应的控制器,以及控制器中的控件
通过懒加载把最初的plist文件加载后,根据plist文件文件中的目标控制器进行跳转,根据加载的plist文件中的plist_name加载将要跳转进去的控制器界面的控件等等. 以上根据target_v ...
- Excessive AWR Growth From Partitioned Objects Such as SYS.WRH$_EVENT_HISTOGRAM Causing Sysaux to Grow
AWR数据增长较快,导致sysaux表空间使用较高 SQL> select f.tablespace_name, 2 a.total, 3 f.free, 4 round((f.free / a ...