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,去 ...
随机推荐
- (转)background-position—CSS设置背景图片的位置
background-position :在 CSS 中通过 background-position 属性可以调整背景图片的位置.因为在默认情况下背景图片都是从设置了 background-posit ...
- js鼠标右键操作
一个页面中,BODY中用oncontextmenu='return false'来取消鼠标右键: 在JS中设置oncontextmenu='return true'用window.document. ...
- swing菜单,常用组件,常用容器
1菜单 import javax.swing.*; import java.awt.*; import java.awt.event.InputEvent; import java.awt.event ...
- asp.net 解决IE11下 From身份验证失效问题
指定如何将 Cookie 用于 Web 应用程序. <forms cookieless="UseCookies" name="test" loginUrl ...
- Css溢出隐藏
display: -webkit-box;-webkit-line-clamp: 2; /*多少行数之后显示为省略...*/word-wrap: break-word;word-break: ...
- javascript 版的 SuperMario
注册博客园4年了,还没发表过一篇文章.明年就是超级马里奥这款游戏诞生30周年了,作为一个喜欢2d卷轴游戏的玩家,决定用js实现一个.目前只实现了基本玩法,得分什么的也还没做.项目的GitHub的地址是 ...
- css3 之表格隔行分色显示
<html> <head> <title></title> <style type="text/css"> table{ ...
- Android 获取网络链接类型
/** * 获取当前网络类型 * @return 0:没有网络 1:WIFI网络 2:WAP网络 3:NET网络 */ public int getNetworkType() { int netTyp ...
- Altium Designer 6 快速进行差分对走线
1: 在原理图中让一对网络前缀相同,后缀分别为_N 和_P,并且加上差分队对指示.在原理图中,让一对网络名称的前缀名相同,后缀分别为_N 和_P,左键点击Place DirectivesDiffere ...
- C++代码覆盖率工具Coverage Validator
市面上的C++代码覆盖率工具大都收费,Coverage Validator也不例外.Coverage Validator应该少有人听过,我也是在stackoverflow里听别人介绍的.所以下载了试用 ...