Apache https 配置指南
Windows Apache HTTPS配置
创建下面3个目录:
C:\Program Files\Apache Group\Apache2\conf\ssl
C:\Program Files\Apache Group\Apache2\conf\ssl.key
C:\Program Files\Apache Group\Apache2\conf\ssl.crt
这里假设apache安装目录是
C:\Program Files\Apache Group\Apache2\
下载
http://tud.at/programm/openssl.cnf
到
C:\Program Files\Apache Group\Apache2\conf\ssl
目录下
进入命令行,输入下面的命令:
# 注:以下用到的密码都是1234
openssl req -config openssl.cnf -new -out server.csr
Country Name (2 letter code) []:CN
State or Province Name (full name) []:Shanghai
Locality Name (eg, city) []:Shanghai
Organization Name (eg, company) []:Company name
Organizational Unit Name (eg, section) []:IT
Common Name (eg, your websites domain name) []:www.test.com
Email Address []:webmaster@test.com
Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []:1234
openssl rsa -in privkey.pem -out server.key
openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 365
openssl x509 -in server.crt -out server.der.crt -outform DER
把server.crt移动到
C:\Program Files\Apache Group\Apache2\conf\ssl.crt
下
把server.key移动到
C:\Program Files\Apache Group\Apache2\conf\ssl.key
下
C:\Program Files\Apache Group\Apache2\apache.exe -D SSL
cd C:\Program Files\Apache Group\Apache2\bin
Apache.exe -k install
Apache.exe -k config -D SSL
Apache.exe -k start
FreeBSD Apache HTTPS配置
1. 设置启动
#echo 'apache2_enable="YES"' >> /etc/rc.conf
#echo ‘apache22ssl_enable="YES"' >> /etc/rc.conf
2. 编辑
/usr/local/etc/apache22/httpd.conf
在最后边加上支持:
Include etc/apache22/extra/httpd-ssl.conf
然后编辑:
/usr/local/etc/apache22/extra/httpd-ssl.conf
修改虚拟机路径:
<VirtualHost _default_:443>
# General setup for the virtual host
DocumentRoot "/usr/local/www/test"
ServerName www.test.com:443
ServerAdmin test@test.com
ErrorLog "/var/log/httpd-error.log"
TransferLog "/var/log/httpd-access.log"
和以下两个位置为你存放证书路径:
SSLCertificateFile "/usr/local/etc/apache22/ssl.key/server.crt"
SSLCertificateKeyFile "/usr/local/etc/apache22/ssl.key/server.key"
3. 配置mod_ssl 生成证书
#openssl genrsa -des3 -out server.key 1024
#openssl rsa -in server.key -out server.key (*从密钥中删除密码,以避免系统启动时被询问口令)
#openssl req -new -key server.key -out server.csr
#openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
#mkdir /usr/local/etc/apache22ssl.key
#mkdir /usr/local/etc/apache22ssl.crt
#chmod 0700 /usr/local/etc/apache22/ssl.key
#chmod 0700 /usr/local/etc/apache22/ssl.crt
#cp ~/server.key /usr/local/etc/apache22/ssl.key/
#cp ~/server.crt /usr/local/etc/apache22/ssl.crt/
#chmod 0400 /usr/local/etc/apache22/ssl.key/server.key
#chmod 0400 /usr/local/etc/apache22/ssl.crt/server.crt
4. 启动服务器,设置完成。访问服务器时输入:https://域名(或IP),浏览器会弹出安装服务器证明书的窗口。说明服务器已经支持SSL了
Apache https 配置指南的更多相关文章
- apache https配置【转】
博文来源:apache https配置 参考博文:apache.nginx配置自签名证书 1. 确认是否安装ssl模块 是否有mod_ssl.so文件 2. 生成证书和密钥 linux下 步骤1: ...
- Windows 下apache https配置(phpstudy)
1.首先获取证书,https://www.pianyissl.com/ 免费三个月的 或者 自己生成私钥.证书,然后应用到apache中. http://blog.sina.com.cn/s/blo ...
- apache https配置
1. 确认是否安装ssl模块 是否有mod_ssl.so文件 2. 生成证书和密钥 linux下 步骤1:生成密钥 命令:openssl genrsa 1024 > server.key 说 ...
- apache https配置步骤
转自:http://www.cnblogs.com/best-jobs/p/3298258.html 1. 确认是否安装ssl模块 是否有mod_ssl.so文件 2. 生成证书和密钥 linux ...
- centos apache2.4.6 apache https配置
错误描述: SSL 接收到一个超出最大准许长度的记录. 错误代码:SSL_ERROR_RX_RECORD_TOO_LONG 原因: root@iZwz93telmwbh624e5zetqZ:~# ap ...
- 【华为云网络技术分享】HTTP重定向HTTPS配置指南
[摘要] 本文介绍使用华为云弹性负载均衡配置Http重定向到Https的方法. 1. HTTP.HTTPS 头部标识 ELB 对 HTTPS 进行代理,无论是 HTTP 还是 HTTPS 请求,到了 ...
- ubantu apache2.4.6 apache https配置
[root@VM_58_118_centos dbback]# a2enmod ssl [root@VM_58_118_centos dbback]# service apache2 restart ...
- Confluence 6 代理和 HTTPS 详细配置指南链接
详细配置指南 更多有关连接器示例,我们提供了一些按步骤配置的指南来帮助你启用 HTTPS 并正确配置你的代理. HTTPS: Running Confluence Over SSL or HTTPS ...
- windows下apache+https环境配置
windows下apache+https环境配置 转 https://www.cnblogs.com/sandaizi/p/7519370.html 1.修改配置文件conf/httpd.conf,去 ...
随机推荐
- 7、第七节课,js逻辑运算
1.条件语句 function MyClick() { ; ; ; if (iNum1==iNum2) { iNum2=iNum3; } alert(iNum2); } 2. iNum3=iNum1& ...
- java 格式判断
public class FormatChecker { /** * 判断是否含有汉字 * @param string */ public static boolean containChinese( ...
- python面对对象编程------3:写集合类的三种方法
写一个集合类的三种方法:wrap,extend,invent 一:包装一个集合类 class Deck: def __init__( self ): self._cards = [card6(r+1, ...
- [php基础]Mysql日期函数:日期时间格式转换函数详解
在PHP网站开发中,Mysql数据库设计中日期时间字段必不可少,由于Mysql日期函数输出的日期格式与PHP日期函数之间的日期格式兼容性不够,这就需要根据网站实际情况使用Mysql或PHP日期转换函数 ...
- 您为这个网络适配器输入的IP地址xxx.xxx.xxx.xx已经分配给另一个适配器xxx...
您为这个网络适配器输入的IP地址xxx.xxx.xxx.xx已经分配给另一个适配器‘xxx NIC’.... 2008年11月03日 星期一 08:51 问题现象: 在网卡的TCP/IP属性中无法 ...
- mysql文件导入到数据库load data infile into table 的使用例子
load data infile "C:/Users/Administrator/Desktop/1.txt"into table 要一个已经存的表名 字段默认用制表符隔开 文件 ...
- 常用CSS代码片断
单行文本截字 .nowrap { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; word-break: normal; ...
- java J2EE学习入门
首先学习JAVA基础编程,大学教材就是最简单的了!象写写Helloworld啊 输出水仙花数啊 玩些简单的,慢慢在研究研究流啊,都可以了.然后学习简单的JSP,这个时候多上网上DOWN一些原码.多看看 ...
- Android Framework------之ActivityManagerService与Activity之间的通信
研究Android系统的童鞋,想必都已经了解一个Activity的启动过程了.而且在网上,关于Activity的启动的文章非常多,很容易就能找到的.这篇文章的重点放在ActivityManagerSe ...
- 生产环境搭建MySQL复制的教程(转)
[导读] 网络上有很多关于MySQL复制搭建的步骤和范例,以及手册上有一章完整的篇幅,讲述MySQL复制的原理.搭建步骤.优化等,但依然存在很多刚开始学习MySQL知识或者刚进入DBA行业的朋友咨询, ...