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 配置指南的更多相关文章

  1. apache https配置【转】

    博文来源:apache https配置 参考博文:apache.nginx配置自签名证书 1.  确认是否安装ssl模块 是否有mod_ssl.so文件 2.  生成证书和密钥 linux下 步骤1: ...

  2. Windows 下apache https配置(phpstudy)

    1.首先获取证书,https://www.pianyissl.com/  免费三个月的 或者 自己生成私钥.证书,然后应用到apache中. http://blog.sina.com.cn/s/blo ...

  3. apache https配置

    1.  确认是否安装ssl模块 是否有mod_ssl.so文件 2.  生成证书和密钥 linux下 步骤1:生成密钥 命令:openssl genrsa 1024 > server.key 说 ...

  4. apache https配置步骤

    转自:http://www.cnblogs.com/best-jobs/p/3298258.html 1.  确认是否安装ssl模块 是否有mod_ssl.so文件 2.  生成证书和密钥 linux ...

  5. centos apache2.4.6 apache https配置

    错误描述: SSL 接收到一个超出最大准许长度的记录. 错误代码:SSL_ERROR_RX_RECORD_TOO_LONG 原因: root@iZwz93telmwbh624e5zetqZ:~# ap ...

  6. 【华为云网络技术分享】HTTP重定向HTTPS配置指南

    [摘要] 本文介绍使用华为云弹性负载均衡配置Http重定向到Https的方法. 1. HTTP.HTTPS 头部标识 ELB 对 HTTPS 进行代理,无论是 HTTP 还是 HTTPS 请求,到了  ...

  7. ubantu apache2.4.6 apache https配置

    [root@VM_58_118_centos dbback]# a2enmod ssl [root@VM_58_118_centos dbback]# service apache2 restart ...

  8. Confluence 6 代理和 HTTPS 详细配置指南链接

    详细配置指南 更多有关连接器示例,我们提供了一些按步骤配置的指南来帮助你启用 HTTPS 并正确配置你的代理. HTTPS: Running Confluence Over SSL or HTTPS  ...

  9. windows下apache+https环境配置

    windows下apache+https环境配置 转 https://www.cnblogs.com/sandaizi/p/7519370.html 1.修改配置文件conf/httpd.conf,去 ...

随机推荐

  1. Interpolator 插值器

    简介 Interpolator:撺改者,校对机,分类机,插补器 Interpolator 定义了动画的变化速度,可以实现匀速.正加速.负加速.无规则变加速等,这使得基本的动画得以实现加速.减速等效果. ...

  2. NOI2015 程序自动分析

    /* 十分简单的题面 离散化一下 然后并茶几一下就OK了 跑的死慢 可能还有更优的方法吧 */ #include<iostream> #include<cstdio> #inc ...

  3. OD: ActiveX Vulnerabilities

    通过一个精心构造的页面 exploit 第三方软件中的 ActiveX 已经成为一种惯用攻击手段,众多知名软件公司都曾被发现其注册的 ActiveX 中存在严重的缓冲区溢出漏洞,一个被广泛使用的第三方 ...

  4. HTML5和CSS3实例教程[总结一]

    关于onclick的行为与内容分离 通过链接触发弹出窗口方式 (不推荐使用此方法!!!) <a href='#' onclcik = "window.open('holiday_pay ...

  5. minus的用法

    简单的说就是去同留异. MINUS 指令是运用在两个 SQL 语句上.它先找出第一个 SQL 语句所产生的结果,然后看这些结果有没有在第二个 SQL 语句的结果中.如果有的话,那这一笔资料就被去除,而 ...

  6. iptables 下开放ftp

    这两天在给客户安装服务器时也顺便给他们使用iptables,不用不知道,一用才发现iptables还有很多东西可以学的,比如开放ftp.iptables 的filter表的INPUT链的默认策略设为了 ...

  7. iOS改变图片尺寸

    - (UIImage *)originImage:(UIImage *)image scaleToSize:(CGSize)size { UIGraphicsBeginImageContext(siz ...

  8. DBA优化SQL采用的WITH AS 用法简介

    一.WITH AS简介 WITH AS的用法从oracle 9i新增的,官方文档也称之为:subquery factoring;在进行复杂的查询.统计等操作时使用with as 子句可以大大提高性能! ...

  9. IntelliJ IDEA 12 创建Web项目 教程 超详细版

    IntelliJ IDEA 12 新版本发布 第一时间去官网看了下  黑色的主题 很给力 大体使用了下  对于一开始就是用eclipse的童鞋们 估计很难从eclipse中走出来 当然 我也很艰难的走 ...

  10. storm教程

    二.安装部署   一.storm伪分布式安装 (一)环境准备1.OS:debian 72.JDK 7.0 (二)安装zookeeper1.下载zookeeper并解压 wget http://mirr ...