`
isiqi
  • 浏览: 16350709 次
  • 性别: Icon_minigender_1
  • 来自: 济南
社区版块
存档分类
最新评论

CentOS 下的 Apache CA 证书申请与导入日志

阅读更多

Get request

[root@tsghweb openssl]# openssl genrsa -des3 -out server.key 1024

Generating RSA private key, 1024 bit long modulus

............++++++

..........++++++

e is 65537 (0x10001)

Enter pass phrase for server.key:

Verifying - Enter pass phrase for server.key:

[root@tsghweb openssl]# openssl req -new -key server.key -out server.csr

Enter pass phrase for server.key:

You are about to be asked to enter information that will be incorporated

into your certificate request.

What you are about to enter is what is called a Distinguished Name or a DN.

There are quite a few fields but you can leave some blank

For some fields there will be a default value,

If you enter '.', the field will be left blank.

-----

Country Name (2 letter code) [GB]:

State or Province Name (full name) [Berkshire]:

Locality Name (eg, city) [Newbury]:

Organization Name (eg, company) [My Company Ltd]:

Organizational Unit Name (eg, section) []:

Common Name (eg, your name or your server's hostname) []:

Email Address []:

Please enter the following 'extra' attributes

to be sent with your certificate request

A challenge password []:

An optional company name []:

[root@tsghweb openssl]#

… …

Verify CA file

[root@tsghweb openssl]# openssl verify -CAfile rootca.crt -purpose sslserver rootcaserver.crt

rootcaserver.crt: /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)09/CN=VeriSign Class 3 Secure Server CA - G2

error 20 at 0 depth lookup:unable to get local issuer certificate

[root@tsghweb openssl]#

[root@tsghweb openssl]# openssl rsa -noout -modulus -in server.key | openssl sha1

Enter pass phrase for server.key:hp0521

fa955c5e12ba90274553d879ba144afb6f7a3946

[root@tsghweb openssl]#

[root@tsghweb openssl]# openssl verify -CAfile rootcaserver.crt -purpose sslserver rootca.crt

rootca.crt: /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)09/CN=VeriSign Class 3 Secure Server CA - G2

error 2 at 1 depth lookup:unable to get issuer certificate

[root@tsghweb openssl]#

… …

Impot certification

[root@tsghweb openssl]# openssl pkcs7 -in server.p7b -inform DER -print_certs -out server-chain.pem

[root@tsghweb openssl]# cp server-chain.pem /etc/pki/tls/certs/server-chain.crt

[root@tsghweb openssl]#

[root@tsghweb openssl]# openssl x509 -in server.cer -inform DER -out server.pem

[root@tsghweb openssl]# cp server.pem /etc/pki/tls/certs/server.crt

[root@tsghweb openssl]# service httpd restart

Stopping httpd: [ OK ]

Starting httpd: Apache/2.2.3 mod_ssl/2.2.3 (Pass Phrase Dialog)

Some of your private key files are encrypted for security reasons.

In order to read them you have to provide the pass phrases.

Server www.hpmtaiwan.tw:443 (RSA)

Enter pass phrase:

OK: Pass Phrase Dialog successful.

[ OK ]

[root@tsghweb openssl]#

分享到:
评论

相关推荐

    CentOS下Apache配置多域名或者多端口映射

    ### CentOS 下 Apache 配置多域名或多端口映射详解 #### 一、概述 在 CentOS 系统中,Apache 是一个广泛使用的 Web 服务器软件,它可以用来托管多个不同的网站或应用服务。为了实现这一点,我们需要对 Apache 进行...

    Centos7安装给Apache服务安装配置SSL证书

    在Centos7.6平台下使用openssl给apache做自签名证书,并给apache设置HTTPS的SSL证书。(无坑版) 二、平台 [root@kahn.xiao ~]# uname -r 3.10.0-957.el7.x86_64 [root@kahn.xiao ~]# cat /etc/redhat-release  ...

    CentOS Apache配置详解

    错误日志文件是 Apache 记录错误信息的地方,默认情况下是/var/log/httpd。这个文件中记录了 Apache 遇到的所有错误信息。 六、 Apache 的控制脚本 Apache 的控制脚本是/usr/sbin/apachectl, 这个脚本可以控制 ...

    centos 下apache+svn安装.docx

    在Linux CentOS系统中,Apache(也称为HTTP Server)与Subversion(SVN)的集成是开发者和团队协作的重要工具,用于版本控制和项目管理。Apache提供了Web服务,而Subversion则作为版本控制系统,允许用户追踪文件和...

    CentOS 下配置Apache服务器

    - **日志记录**:Apache的日志文件通常位于`/var/log/httpd/`,包括访问日志和错误日志。 3. **启动和管理Apache**: 启动Apache服务: ``` sudo systemctl start httpd ``` 设置为开机启动: ``` sudo ...

    CentOS卸载Apache方法.docx

    然而,在某些情况下,可能需要卸载Apache,例如升级到新版本、更换其他Web服务器或者清理系统资源。以下是一个详细的步骤来卸载Apache在CentOS上的过程。 首先,你需要确保Apache服务已经停止运行,以免在卸载过程...

    centos7 apache

    本文将深入探讨在CentOS 7上安装和配置Apache,以及与之相关的OpenSSL、Rewrite模块、APR(Apache Portable Runtime)、APR-Util和PCRE(Perl Compatible Regular Expressions)库,还有Expat-devel——这些组件对于...

    Linux CentOS离线环境下安装Apache所需要的完整包

    在Linux CentOS离线环境下安装Apache服务器,特别是在没有网络连接的情况下,需要手动下载并准备所有必要的依赖包。这个压缩包文件提供了在这样的环境中成功安装Apache及其扩展模块mod_wsgi所需的所有组件。下面将...

    centos6 apache简单使用.txt

    centos6 apache简单使用,基本报错都能解决。当时自己也是各种出错,所以就有了这个教程。

    CentOS下apache负载均衡与JBoss集群配置

    在本文中,我们将讨论在CentOS操作系统环境下,如何进行Apache负载均衡与JBoss集群的配置。负载均衡和集群配置是提高网站可用性、扩展性和性能的关键技术。通过这篇文章,我们会了解到详细的配置步骤,以及它们在...

    CentOS 卸载 Apache

    CentOS 卸载 Apache 在 Linux 系统中,Apache 是一个非常流行的 Web 服务器软件,但是有时候我们可能需要卸载它,以释放系统资源或更换为其他软件。在 CentOS 系统中,卸载 Apache 可以通过以下步骤完成。 查看 ...

    CentOS+Apache+PHP+MySQL.pdf

    本指南将详细介绍在CentOS操作系统上如何安装并配置Apache、MySQL和PHP,形成一个LAMP(Linux、Apache、MySQL、PHP)环境的过程。LAMP是构建动态网站和网络应用最流行的平台之一。 首先,需要准备三个主要软件的...

    CentOS Apache SSL Configuration

    CentOS Apache SSL 配置 CentOS Apache SSL 配置是指在 CentOS 操作系统中配置 Apache 服务器以使用 SSL 加密连接的过程。SSL(Secure Sockets Layer)是一种加密协议,用于保护 Web 服务器和浏览器之间的通信。 ...

    CentOS7 syslog日志转发配置.docx

    ### CentOS 7 syslog日志转发配置详解 #### 一、Syslog简介 Syslog是一种广泛应用于网络设备的日志记录协议,主要用于将系统日志信息发送到特定的日志服务器上进行集中管理和监控。这对于大型网络环境来说尤其重要...

    Centos7.6下oracle impdp导入和expdp导出.docx

    通过上述步骤,我们可以在 Centos7.6 下顺利完成 Oracle 数据库的导出与导入操作。需要注意的是,在实际操作过程中可能会遇到各种问题,如权限问题、磁盘空间不足等,因此建议在正式执行前做好充分的测试和准备。...

    centos apache安装文件打包下载

    4. **编译与配置**:进入解压后的目录,配置Apache以适应系统环境: ``` cd httpd-2.4.10 ./configure --prefix=/usr/local/apache2 --enable-mods-shared=all --with-pcre=/path/to/pcre-8.36 --with-apr=/path...

    centos安装apache

    除此之外,还有几个依赖库的源码包,包括`pcre-8.33.tar.gz`(Perl兼容正则表达式库),`apr-1.4.6.tar.gz`(Apache Portable Runtime库)和`apr-util-1.5.2.tar.gz`(与APR相关的实用工具库)。这些库是Apache运行...

Global site tag (gtag.js) - Google Analytics