Apache支持ssl

1、检测是否安装ssl模块,如果没有就安装

[root@localhost cgi-bin]# rpm -qa | grep mod_ssl           //查看是否安装ssl模块

[root@localhost cgi-bin]# yum install -y mod_ssl           //安装ssl

Loaded plugins: fastestmirror, refresh-packagekit, security

Loading mirror speeds from cached hostfile                                 

Complete!

[root@localhost cgi-bin]# 

2、修改ssl的配置文件“/etc/httpd/conf.d/ssl.conf”如下,开启ssl,设置监听端口

[root@localhost ~]# gedit /etc/httpd/conf.d/ssl.conf

# Do NOT simply read the instructions in here without understanding

# what they do.  They're here only as hints or reminders.  If you are unsure

# consult the online docs. You have been warned.  

LoadModule ssl_module modules/mod_ssl.so           //开启ssl功能

# When we also provide SSL we have to listen to the 

# the HTTPS port in addition.

Listen 443       //监听的端口

3、修改防火墙配置,开启对上面端口443的支持

1)在终端输入命令“setup”,在弹出的框中选择“防火墙”,接着选择“定制”

2)使用空格键选中”https“,接着选择“转发”

3)选择“添加“

4)添加端口443,协议tcp,然后确定

5)回到最初的界面,“确定”

6)重启防火墙

[root@localhost ~]# service iptables restart

iptables:将链设置为政策 ACCEPTfilter nat                [确定]

iptables:清除防火墙规则:                                 [确定]

iptables:正在卸载模块:                                   [确定]

iptables:应用防火墙规则:                                 [确定]

[root@localhost ~]#

7)重启apache

[root@localhost ~]# service httpd restart

停止 httpd                                              [确定]

正在启动 httpdhttpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName

                                                          [确定]

[root@localhost ~]# 

 

4、测试

1)在浏览器输入https://127.0.0.1,注意必须是“https“ ,看到如下结果

2)选择“我已充分了解”,弹出如下对话框,选择“确认安全例外”就可以正常访问

做了一个Linux学习的平台,目前出来一个雏形,各位可以参考使用
链接:https://pan.baidu.com/s/1GOLVU2CbpBNGtunztVpaCQ  密码:n7bk

Linux服务器---apache支持SSL的更多相关文章

  1. Linux服务器---apache支持cgi

    Apache支持cgi  1.打开Apache配置文件httpd.conf,搜索“cgi”,找到下面的一段,去掉“addhandler”前面的“#“,这样就开启了Apache的cgi功能 [root@ ...

  2. linux 服务器所支持的最大句柄数调高数倍(与服务器的内存数量相关)

    https://github.com/alibaba/p3c/blob/master/阿里巴巴Java开发手册(详尽版).pdf 2. [推荐]调大服务器所支持的最大文件句柄数(File Descri ...

  3. linux下apache安装ssl步骤

    制作证书: 参考:linux下运用opensll制作ssl证书 生成三个证书 server.crt .server-ca.crt.server.key 安装openssl tar -xzvf open ...

  4. Linux下Apache配置SSL支持https

    参考:http://www.thinksaas.cn/group/topic/280017/ 生成证书过程如下 Step :生成服务器密钥: mkdir -p /etc/pki/test cd /et ...

  5. ubuntu16.04服务器apache的ssl证书配置

    背景:在腾讯云申请的免费证书1年,服务器ubuntu 16.04版本,我的是多域名 1.ssl模块的安装 sudo a2enmod ssl //开启apache ssl模块 a2ensite defa ...

  6. Linux让Apache支持中文URL图片/文件名

    需要用到iconv_hook和mod_encoding Apache(32位): 安装环境:CentOS 5.6 + Apache 2.2.15 (Apache2.4同样适用) 安装结果:安装后支持“ ...

  7. centos linux服务器apache+mysql环境访问慢优化方法

    查找软件安装目录:find / -name 软件名称 一.优化apache配置增加MaxClients的值 默认情况下,2.0及以上apache版本MaxClients的值为256,对于中大型应用访问 ...

  8. Linux服务器---apache配置文件

    Apache配置文件 Apache的配置文件默认路径是“/etc/httpd/conf/httpd.conf”,编辑该文件就可以修改Apache的配置 1.设置网页主目录,参数DocumentRoot ...

  9. linux服务器apache 一个IP,一个端口,建立多个网站的方法。

    找到apache-tomcat-6.0.14\conf\server.xml ,再services 后面添加此段代码: Xml代码 <!-- 此处  新增的项目配置-->  <Ser ...

随机推荐

  1. mysql 存储过程用程序调的问题

    记一下,存储过程加了commit结果用mysql客户端执行不报错,用jdbcTemplate执行就执行了一步,因为加了commit后面的程序都不跑了.另外 存储过程里面如果用java调的话select ...

  2. Linux--netstat命令

    netstat:显示网络状态 语法定义:netstat [-acCeFghilMnNoprstuvVwx] [-A<网络类型>][--ip] 参数说明: -a 或 -all :显示所有连线 ...

  3. SQL Fundamentals || DCL(Data Control Language) || 角色ROLES

    SQL Fundamentals || Oracle SQL语言 语句 解释 Create user Creates a user(usually performed by a DBA) Grant ...

  4. Spacy 使用

    # 前提是必须安装: python -m spacy download ennlp = spacy.load('en')text = u"you are best. it is lemmat ...

  5. python3学习笔记(7)_listComprehensions-列表生成式

    #python3 学习笔记17/07/11 # !/usr/bin/env python3 # -*- conding:utf-8 -*- #通过列表生成式可以生成格式各样的list,这种list 一 ...

  6. Django - 用户认证、用户组、用户权限

    https://www.cnblogs.com/ccorz/p/6358074.html auth模块是Django提供的标准权限管理系统,可以提供用户身份认证, 用户组和权限管理. auth可以和a ...

  7. 2018/03/28 每日一个Linux命令 之 mkdir/rmdir

    用于建立空文件夹和删除文件夹 -- 两命令重要参数 -p 递归建立/删除 -- 例如 mkdir -p demo1/demo2/demo3 建立demo3空文件夹,如果demo1/demo2没建立也建 ...

  8. 【Python接口测试】简单系统登录接口测试实例

    我们可以用Jmeter做接口测试,但是呢个人觉得那个有点局限性,用python就灵活很多, 可以按自己的思路来构建比较灵活,下面给大家介绍一个简单的接口测试实例. 一.我们的思路如下: 首先我们要弄清 ...

  9. 【Python】小练习

    1.python爬虫 (1)抓取一个新闻网上含有某一关键字的新闻,http://internasional.kompas.com/就是这个网站上面所有内容含有THAAD这个关键词的新闻 (2)爬取大众 ...

  10. java list map用法

    1.初始化,方法1 //初始化List List<string> list = new ArrayList</string><string>(); list.add ...