centos apache搭建https

[[email protected] ~]$ cd /opt/src/httpd-2.2.29/modules/ssl/

[[email protected] ssl]$ apxs

[[email protected] ssl]$ /usr/local/apache2/bin/apxs -i -c -a -D HAVE_OPENSSL=1 -I /usr/include/openssl/  -lcrypto -lssl -ldl *.c

[[email protected] ssl]# vim /etc/httpd/extra/httpd-ssl.conf

DocumentRoot "/var/www/api"
ServerName api.example.com:443
SSLEngine on
SSLCertificateFile "/etc/httpd/server.crt"
SSLCertificateKeyFile "/etc/httpd/server.key"

[[email protected] ssl] /usr/local/apache2/bin/httpd -t

[[email protected] ssl] service httpd restart

注:

server.crt、server.key来自startssl

时间: 2024-07-30 13:29:17

centos apache搭建https的相关文章

使用apache建立https站点详细

环境: 系统:centos6.5 内核版本:2.6.32-431.el6.i686 apache(以下以httpd代替)版本:httpd-2.2.15-39.el6.centos.i686 虚拟机:10.0.4 build-2249910 http_server_IP=192.168.1.10 Openssl版本:openssl-1.0.1e-15.el6.i686 测试域名:www.jingjun.com mod_ssl版本:mod_ssl-2.2.15-39.el6.centos.i686

CentOS 6下Apache的https虚拟主机实践

题目:1.建立httpd服务器,要求: 提供两个基于名称的虚拟主机: (a)www1.buybybuy.com,页面文件目录为/web/vhosts/www1:错误日志为/var/log/httpd/www1.err,访问日志为/var/log/httpd/www1.access: (b)www2.buybybuy.com,页面文件目录为/web/vhosts/www2:错误日志为/var/log/httpd/www2.err,访问日志为/var/log/httpd/www2.access: (

linux 搭建https 服务器 (apache)

一.  安装准备 1.    安装Openssl 要使Apache支持SSL,需要首先安装Openssl支持.这里使用的是openssl-0.9.8k.tar.gz 下载Openssl:http://www.openssl.org/source/ tar -zxf openssl-0.9.8k.tar.gz    //解压安装包 cd openssl-0.9.8k                 //进入已经解压的安装包 ./config                          //配

apache+ssl 在linux上搭建https超文本传输,关闭80端口

1.要搭建https,必须要具备的东西 1.超文本传输协议httpd(apache)和ssl模块(mod_ssl) 2.用于加密超文件传输的证书.(openssl制作自签名证书) 3.测试 2.安装httpd yum install httpd mod_ssl -y 3.安装openssl yum install openssl -y 这里介绍httpd默认的配置文件路径.www路径.默认的证书路径.默认的私钥路径. 配置文件路径     /etc/httpd/conf/httpd.conf w

Linux 搭建APache http_ssl(https)

 搭建APache http_ssl(https) 网站服务器(192.168.4.3) 1 网站服务器配置 运行网站服务 并编写网页文件 index.html [[email protected] ~]# yum -y install httpd [[email protected] ~]# echo www.test.com > /var/www/html/index.html [[email protected] ~]# systemctl start httpd [[email prot

centos配置apache的https服务

因为公司要开发微信小程序,由于小程序比较特殊,需要https服务,所以就研究了下apache的https服务了,大致过程如下: 1.向证书机构申请https证书,会得到证书和私钥 2.安装apache的mod_ssl.so模块 yum -y install mod_ssl 3.若启用了防火墙需要添加https服务(service iptables status或者在使用firewall的情况下用 systemctl status firewalld) 用iptables的情况 iptables 

Virtual Box + CentOS Minimal + Apache搭建Web服务器

本文并不介绍关于Virtual Box, CentOS, Apache的安装, 主要针对安装后相关的配置, 使宿主机(Host)可以访问客户机(Guest: CentOS in Virtual Box)提供的Web服务. Virtual Box网络设置 网上不少文章说要使用Host访问Guest的Web服务, 需要提供两种网络(NAT与HostOnly), 实际上我们只需要使用NAT网络即可达到目的. 以网卡1为例, 在连接方式中选择"网络地址转换(NAT)", 混杂模式设为"

Linux apache自建证书搭建https

前言 搭建https有两种方式,分为单向认证和双向认证.单向认证就是传输的数据加密过了,但是不会校验客户端的来源,也就只有客户端验证服务端证书. 单向认证 1.安装mod_ssl yum -y install mod_ssl 2.HTTP 服务器上配置mod_ssl 2.1.进入http服务器配置文件所在目录 cd /etc/pki/tls/certs/ 2.2.建立服务器密钥 [[email protected] certs]# make server.key           #建立服务器

在Linux上用Apache搭建Git服务器

在Linux上用Apache搭建Git服务器 最近在学Linux,终于在Linux上用Apache搭建起了Git服务器,在此记录一下. 服务器:阿里云服务器 Linux版本:CentOS 6.5 Apache版本:Apache/2.2.15 Git版本:git 1.7.1 Git访问方式:基于http的基本验证(非SSL) Apache的安装 1. 安装Apache软件:yum install httpd 2. 设置Apache在服务器启动时运行:chkconfig --levels 235 h