apache配置ssl
linux下步骤1:生成密钥命令:openssl genrsa 1024 > server.key说明:这是用128位rsa算法生成密钥,得到server.key文件步骤2: 生成证书请求文件命令:openssl req -new -key server.key > server.csr说明:这是用步骤1的密钥生成证书请求文件server.csr, 这一步提很多问题,一一输入步骤3: 生成证书命令:openssl req -x509 -days 365 -key server.key -in server.csr > server.crt说明:这是用步骤1,2的的密钥和证书请求生成证书server.crt,-days参数指明证书有效期,单位为
window下步骤1:生成密钥命令:openssl genrsa 1024 > server.key说明:这是用128位rsa算法生成密钥,得到server.key文件步骤2: 生成证书请求文件命令:openssl req -config D:\work_soft\Apache2.2\conf\openssl.cnf -new -key server.key > server.csr说明:这是用步骤1的密钥生成证书请求文件server.csr, 这一步提很多问题,一一输入步骤3: 生成证书命令:openssl req -config D:\work_soft\Apache2.2\conf\openssl.cnf -x509 -days 365 -key server.key -in server.csr > server.crt说明:这是用步骤1,2的的密钥和证书请求生成证书server.crt,-days参数指明证书有效期,单位为天
<IfModule mod_ssl.c>
# Pseudo Random Number Generator (PRNG):
# Configure one or more sources to seed the PRNG of the SSL library.
# The seed data should be of good random quality.
# WARNING! On some platforms /dev/random blocks if not enough entropy
# is available. This means you then cannot use the /dev/random device
# because it would lead to very long connection times (as long as
# it requires to make more entropy available). But usually those
# platforms additionally provide a /dev/urandom device which doesn't
# block. So, if available, use this one instead. Read the mod_ssl User
# Manual for more details.
#
SSLRandomSeed startup builtin
SSLRandomSeed startup file:/dev/urandom 512
SSLRandomSeed connect builtin
SSLRandomSeed connect file:/dev/urandom 512 ##
## SSL Global Context
##
## All SSL configuration in this context applies both to
## the main server and all SSL-enabled virtual hosts.
## #
# Some MIME-types for downloading Certificates and CRLs
#
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl # Pass Phrase Dialog:
# Configure the pass phrase gathering process.
# The filtering dialog program (`builtin' is a internal
# terminal dialog) has to provide the pass phrase on stdout.
SSLPassPhraseDialog exec:/usr/share/apache2/ask-for-passphrase # Inter-Process Session Cache:
# Configure the SSL Session Cache: First the mechanism
# to use and second the expiring timeout (in seconds).
# (The mechanism dbm has known memory leaks and should not be used).
#SSLSessionCache dbm:${APACHE_RUN_DIR}/ssl_scache
SSLSessionCache shmcb:${APACHE_RUN_DIR}/ssl_scache(512000)
SSLSessionCacheTimeout 300 # Semaphore:
# Configure the path to the mutual exclusion semaphore the
# SSL engine uses internally for inter-process synchronization.
# (Disabled by default, the global Mutex directive consolidates by default
# this)
#Mutex file:${APACHE_LOCK_DIR}/ssl_mutex ssl-cache # SSL Cipher Suite:
# List the ciphers that the client is permitted to negotiate. See the
# ciphers(1) man page from the openssl package for list of all available
# options.
# Enable only secure ciphers:
SSLCipherSuite HIGH:!aNULL # SSL server cipher order preference:
# Use server priorities for cipher algorithm choice.
# Clients may prefer lower grade encryption. You should enable this
# option if you want to enforce stronger encryption, and can afford
# the CPU cost, and did not override SSLCipherSuite in a way that puts
# insecure ciphers first.
# Default: Off
#SSLHonorCipherOrder on # The protocols to enable.
# Available values: all, SSLv3, TLSv1, TLSv1.1, TLSv1.2
# SSL v2 is no longer supported SSLProtocol all -SSLv3 # Allow insecure renegotiation with clients which do not yet support the
# secure renegotiation protocol. Default: Off
#SSLInsecureRenegotiation on # Whether to forbid non-SNI clients to access name based virtual hosts.
# Default: Off #SSLStrictSNIVHostCheck On
</IfModule>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
ssl.load
# Depends: setenvif mime socache_shmcb
LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
4、在/etc/apache2/mods-enabled下设置刚才配置文件的软连接
ln -s ../mods-available/ssl.conf ssl.conf
apache配置ssl的更多相关文章
- apache 配置 SSL
假设apache已经装好 1.使用yum install openssl,安装openssl 2.开启httpd.conf中LoadModule ssl_module modules/mod_ssl. ...
- window下为apache配置ssl证书
转载自 子非鱼 的博客稍作修改 第一步:依赖 配置Apache服务器支持https协议和SSL证书,最基本的要求是Apache包含openssl模块.还好apache/bin目录下有libeay32. ...
- windows下Apache配置SSL安全连接
什么是SSL? SSL(Secure Socket Layer): 是为Http传输提供安全的协议,通过证书认证来确保客户端和网站服务器之间的数据是安全.Open SSL下载地址:http://www ...
- windows下apache配置ssl(https)服务器
SSl是为Http传输提供安全的协议,通过证书认证来确保客户端和网站服务器之间的数据是安全, 可以通过apache自带的openssl进行配置: 步骤如下: 1.安装有openssl模板的apache ...
- Apache 配置SSL网站
1. 申请证书 现在可以在阿里云或七牛上申请免费的证书,这里以阿里云为例 进入阿里云证书申请界面 https://www.aliyun.com/product/cas ...
- centos7 apache 配置ssl
因为小程序后台服务器需要是https的,所以这两天赶紧百度了一波什么是https以及怎么将服务器升级为https.虽然网上教程很多但因具体环境可能有差异导致一路遇坑,摸爬滚打了两天终于弄好了.遂记下一 ...
- Linux下Apache配置SSL支持https
参考:http://www.thinksaas.cn/group/topic/280017/ 生成证书过程如下 Step :生成服务器密钥: mkdir -p /etc/pki/test cd /et ...
- Appserv(Apache) 配置ssl证书
一:打开httpd.conf文件,移除注释的行: Include conf/extra/httpd-ahssl.conf LoadModule ssl_module modules/mod_ssl.s ...
- 8-STM32物联网开发WIFI(ESP8266)+GPRS(Air202)系统方案安全篇(Apache 配置SSL,HTTPS连接)
https://www.cnblogs.com/yangfengwu/p/10947423.html 和当时配置MQTT差不多,去下载证书文件 https://www.cnblogs.com/ya ...
随机推荐
- Tr A--hdu1575(矩阵快速幂)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1575 算是模板吧 #include <iostream> #include <std ...
- Python并行编程(一):基本概念
1.线程和进程 进程是应用程序的一个执行实例,比如,在桌面上双击浏览器将会运行一个浏览器.线程是一个控制流程,可以在进程内与其他活跃的线程同时执行.控制流程指的是顺序执行一些机器指令.进程可以包含多个 ...
- 7.Git工作区和暂存区
Git和其他版本控制系统如SVN的一个不同之处就是有暂存区的概念. 先来看名词解释. 1.工作区(Working Directory) 就是你在电脑里能看到的目录,比如我的test文件夹就是一个工作区 ...
- (4.2)动态管理视图DMV
以下是一些您应该熟悉的更有用的DMV: 1.sys.dm_exec_cached_plans - 可用于SQL Server的缓存查询计划 2.sys.dm_exec_sessions - SQL S ...
- 菜鸟也能学cocos2dx3.0 浅析刀塔传奇(下)
首先我们讲点话外的东西,异步载入:众所周知,loading里面一般都是载入数据的,那么是怎么载入的呢? Director::getInstance()->getTextureCache()-&g ...
- 003-maven简介
1.1简介 Maven,只是的积累,专家或内行 Maven是优秀的构建工具,依赖管理工具,项目信息管理工具,跨平台.提供了中央仓库,自动下载构件. 1.通过坐标系统定位每一个构件(artifact), ...
- Jenkins的安装及邮件配置
Jenkins介绍 Jenkins,是基于Java开发的一种持续集成工具,用于监控秩序重复的工作,包括: 1).持续的软件版本发布/测试项目. 2).监控外部调用执行的工作. Jenkins安装 j ...
- 最长上升子序列算法(n^2 及 nlogn) (LIS) POJ2533Longest Ordered Subsequence
问题描述: 一个数的序列bi,当b1 < b2 < ... < bS的时候,我们称这个序列是上升的.对于给定的一个序列(a1, a2, ..., aN),我们可以得到一些上升的子序列 ...
- B-、B+、B*树
B-树:多路搜索树,每个结点存储M/2到M个关键字,非叶子结点存储指向关键字范围的子结点:所有关键字在整颗树中出现,且只出现一次,非叶子结点可以命中: B+树:在B-树基础上,为叶子结点增加链表指针, ...
- 转:在0~N(不包括N)范围内随机生成一个长度为M(M <= N)且内容不重复的数组
1. 最朴素暴力的做法. void cal1() { , j = , num = ; int result[M]; result[] = rand() % N; //第一个肯定不重复, 直接加进去 ; ...