linux ssl证书配置(apache)
来源:互联网 发布:三国杀实体卡牌淘宝 编辑:程序博客网 时间:2024/05/06 01:16
1. 前提是 已通过第三方 申请到 .crt .key 和 .ca-bundle 文件
2. 将三个文件拷贝到linux服务器上 任意一个指定的目录
3. 找到要编辑的apache配置
Apache主配置文件通常叫做 httpd.conf 或 apache2.conf. 常见路径包括 /etc/httpd/ 或 /etc/apache2/
SSL 证书配置通常位于一个不同的配置文件的 <VirtualHost> 区块内. 配置文件可能位于诸如/etc/httpd/vhosts.d/, /etc/httpd/sites/目录, 或在一个叫做httpd-ssl.conf的文件里.
4. 找到VirtualHost 模块进行配置
<VirtualHost *:443>DocumentRoot /var/www/html2ServerName www.yourdomain.comSSLEngine onSLCertificateFile /path/to/your_domain_name.crtSSLCertificateKeyFile /path/to/your_private.keySSLCertificateChainFile /path/to/ComodoCA.crt</VirtualHost>
5. 测试 apache config
apachectl configtest
6. 重启apache
systemctl restart httpd
顺利的情况下基本已经ok了
但更多的时候是无法重启 遇到问题
常见问题如下:
1. Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration
这个表示 ssl 需要 mod_ssl模块支持 需安装 (指令 yum install mod_ssl ,一般系统会自带openssl)
2.
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.29.179.155. Set the 'ServerName' directive globally to suppress this mes sage
这个是因为 主 apache 的 httpd.conf 配置 缺少 ServerName localhost:80, 找到 ServerName 并加上
3. 如何兼容 http 只需要将原来的 vhost.conf 里的东西保留 同时加上ssl的文章上面所述配置内容 即可
4. 注意 每修改一次 配置 需要重启一次 apache
- linux ssl证书配置(apache)
- linux ssl证书配置(apache)
- Linux+Apache安装生成配置SSL证书
- apache配置ssl证书
- Linux下导入SSL证书(配置用于Apache)
- apache ssl 配置 自签名证书实现
- linux下的apache部署ssl证书
- linux下的apache部署ssl证书
- Apache + SSL搭建Linux证书服务器
- Linux apache下导入SSL证书
- Linux apache下导入SSL证书
- 生成apache ssl证书
- apache部署ssl证书
- linux之tomcat的ssl证书配置
- StartSSL免费SSL证书申请使用:Apache和Ngnix安装配置SSL证书
- openssl建立证书,非常详细配置ssl+apache
- openssl建立证书,非常详细配置ssl+apache
- openssl建立证书,非常详细配置ssl+apache
- C++ 11 标准及知识点的记录(1)
- JAVA反射机制
- Spring Boot学习笔记
- DWF整合spring异常:**ScopedProxyUtils.isScopedTarget
- 你是一个易怒的人吗?
- linux ssl证书配置(apache)
- oracle命令行导出导入数据库
- vimの的两合字母
- greenDao3.x 深入使用
- 慢日志查询 MySQLdumpslow 命令用法详解
- 自定义控件出现Custom view * is not using the 2- or 3-argument View constructors
- 深入学习javascript--Module模式
- 爬取12306验证码图片
- 转发与重定向的区别