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. spring03autowire属性

    1.创建需要的实体类 public class Student { //学生实体类 private String name; //姓名 private Integer age; //年龄 privat ...

  2. Linux基础知识之 系统启动流程

    [1]Linux启动的几个主要阶段 启动流程示意图

  3. wildfly部署solr.war

    1.添加solr/home配置,有两种途径: 一个是修改solr.war包的web.xml,路径如下:solr-4.7.2.rar\WEB-INF\web.xml,添加如下内容:

  4. MTK Android 默认值修改笔记

    1.设置菜单: 1.1位置信息(Location)默认关闭: 请将 alps\frameworks\base\packages\SettingsProvider\res\values\default. ...

  5. handler更新UI主线程

    示例:下面代码的功能是修改UI主线程TextView的内容 public class MainActivity extends Activity { private Button btn_start; ...

  6. linux下软件安装与卸载

    linux上软件二进制安装主要分为:rpm手动安装和yum在线安装(其所安装的都为rpm二进制包). 关于rpm手动安装,学习后面内容前需分清如下内容: 包全名 : 操作的包是没有安装的软件包时,使用 ...

  7. iOS判断UIScrollView的滚动方向

    - (void) scrollViewDidScroll:(UIScrollView *)scrollView { CGFloat newY = scrollView.contentOffset.y; ...

  8. PHP 运算符

    本章节我们将讨论 PHP 中不同运算符的应用. 在 PHP 中,赋值运算符 = 用于给变量赋值. 在 PHP 中,算术运算符 + 用于把值加在一起. PHP 算术运算符 运算符 名称 描述 实例 结果 ...

  9. java中的hashcode方法作用以及内存泄漏问题

    本文装载:http://hi.baidu.com/iduany/item/6d66dfc9d5f2da1650505870 hashCode()方法的作用&使用分析 一直以来都想写篇文章来说明 ...

  10. CSS分别设置Input样式(按input类型)

    当你看到<input>这个html标签的时候,你会想到什么?一个文本框?一个按钮?一个单选框?一个复选框?……对,对,对,它们都对.也许你可能想不到,这个小小的input竟然可以创造出10 ...