美文网首页
Apache 配置https详细步骤

Apache 配置https详细步骤

作者: 南京杨小兵 | 来源:发表于2017-04-12 22:51 被阅读392次

1、先lsb_release -a  查看系统版本,不同版本情况很大区别

[root@iZ23p5a9q9nZ ~]# lsb_release -a

LSB Version::core-4.1-amd64:core-4.1-noarch

Distributor ID:CentOS

Description:CentOS Linux release 7.0.1406 (Core)

Release:7.0.1406

Codename:Core

2、先卸载apache 1,service httpd stop停止Apache   2、yum list|grep httpd #查看apache包名,例如httpd.x86_64

yum erase httpd.x86_64         #相关依赖包自动会被删除

3、安装 httpd :    yum -y install httpd

安装openssl    :yum install openssl

默认安装的路径为/etc/httpd/

4、然后重启  service httpd restart

5、报这个Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration

错误的时候运行加载mod_ssl yum install mod_ssl

cd /etc/httpd/conf

编辑/etc/httpd/conf/httpd.conf

找到如下内容:

#ServerName www.example.com:80

更改为

ServerName localhost:80

把证书拷贝到某个目录下

cd /etc/httpd/conf/vhosts.conf

6、添加文件vhosts.conf

vim /etc/httpd/conf.d/vhosts.conf

配置apache

service httpd start

此命令查看启动Apache是报的详细错误,会提示到哪一行问题  systemctl status httpd.service -l

其他查看apache各种状态命令

service apache2 restart

service apache2 status

service apache2 reload

相关文章

  • Apache 配置https详细步骤

    1、先lsb_release -a 查看系统版本,不同版本情况很大区别 [root@iZ23p5a9q9nZ ~]...

  • Tomcat

    tomcat 配置查看:Mac系统安装和配置tomcat步骤详解在mac系统安装Apache Tomcat的详细步...

  • Apache下配置HTTPS协议

    在Apache服务器下配置HTTPS协议主要有三个步骤: 1、申请CA证书; 2、域名验证;3、配置Apache ...

  • apache配置https

    参考url https://blog.csdn.net/ithomer/article/details/50433...

  • Apache配置https

    Apache Apache命令 Apache开启https SSL生成证书:步骤1:生成密钥 步骤2: 生成证书请...

  • Apache 配置https

    安装证书模块 查看apache已安装了哪些模块 编辑apache配置文件/etc/httpd/conf.d/ssl...

  • Apache配置HTTPS

    起因 昨天说弄小程序,结果调用wx.request的时候发现,说没有配置域名,仔细一看开发文档才发现,原来请求的U...

  • tomcat搭建https服务

    tomcat配置https协议详细步骤 1.在tomcat上搭建https服务。 环境:jdk7,tomcat7,...

  • React Native

    1、环境配置详细步骤移步RN中文网:https://reactnative.cn/docs/0.51/gettin...

  • Apache2 WEB服务器的配置方法如下

    Apache2 WEB服务器的配置步骤分享,配置apache服务器的朋友可以参考下。 安装配置apache2 1....

网友评论

      本文标题:Apache 配置https详细步骤

      本文链接:https://www.haomeiwen.com/subject/ccevattx.html