linux ssl证书配置(apache)
来源:互联网 发布:mac blue player 编辑:程序博客网 时间:2024/05/16 17:08
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
- 录音机(SoundRecorder)接收多种广播的操作
- Python的zip函数
- 使用C#更新word中的目录域
- 如何在 vue 项目里正确地引用 jquery 和 jquery-ui的插件
- 封装PageModel分页实现查询功能
- linux ssl证书配置(apache)
- java常用的正则表达式验证
- Centos 下安装Redis
- 根据对象的其中一个字段进行排序
- 51nod_大数加法
- 玩了一个可以亲亲的游戏O(∩_∩)O哈哈~
- 线程局部存储-pthread_getspecific和pthread_setspecific使用
- 重新配置lotus Notes 9.0客户端
- 关于超出父视图的子视图点击事件