Web Server Certificate and Required Fields

This section provides information on how to obtain a Web server certificate and verify its required fields. An example of server certificate is also provided.

There are several ways to get a Web server certificate and its associated private key.

1. Order a Web server certificate from a commercial CA (Certificate Authority) like DigiCert or GlobalSign. It will provide you a Web server certificate and its private key.

2. Generate your own private key with a CSR (Certificate Sign Request). Then send the CSR to a CA to sign it into a server certificate. This is more secure, because the private key is not exposed to the CA.

3. Generate your own private key with a CSR (Certificate Sign Request). Then sign the CSR with your own CA tool like OpenSSL. This is not recommended for a public Website, because your root CA certificate is recognized by the public as a trusted root CA.

Note that the CA should also provide you their CA certificate that signs your certificate. You may also get multiple CA certificates as a certificate chain that signs your certificate. Those CA certificates are also needed by the Apache HTTP Server to support the HTTPS protocol.

No matter how you obtain your server certificate, you must make sure it meet the following requirements:

1. The certificate format should be X.509 version 3.

2. The expiration date should be future date.

3. The Subject's CN (Common Name) field should be your Website name.

4. The public key length must meet the minimum requirement. For example, the minimum length of a RSA public key is 2024 bits.

5. The X.509 v3 "Subject Alternative Name" field must contain a DNS entry that matches your Web server domain name; or an IP entry that matches your Web server IP address, if no domain name is used.

6. The X.509 v3 "Subject Usage" field must contain "Digital Signature" and "Key Encipherment" entries.

7. The X.509 v3 "Extended Key Usage" field must contain the "TLS Web Server Authentication" entry.

Here are the details from my herongyang.com server certificate extracted by the "openssl x509" command:

herong$ openssl x509 -text -noout -in herongyang-cert.pem 

    Version: 3 (0x2)
    Serial Number:
    Signature Algorithm: sha256WithRSAEncryption
    Issuer: C=US, O=DigiCert Inc, OU=www.digicert.com, 
      CN=Encryption Everywhere DV TLS CA - G2
      Not Before: Nov 16 00:00:00 2023 GMT
      Not After : Nov 30 23:59:59 2024 GMT
    Subject: CN=*.herongyang.com
    Subject Public Key Info:
      Public Key Algorithm: rsaEncryption
      RSA Public Key: (2048 bit)
        Modulus (2048 bit):
        Exponent: 65537 (0x10001)
    X509v3 extensions:
      X509v3 Authority Key Identifier: 

      X509v3 Subject Key Identifier: 
      X509v3 Subject Alternative Name: 
        DNS:*.herongyang.com, DNS:herongyang.com
      X509v3 Certificate Policies: 
          CPS: http://www.digicert.com/CPS

      X509v3 Key Usage: critical
        Digital Signature, Key Encipherment
      X509v3 Extended Key Usage: 
        TLS Web Server Authentication, TLS Web Client Authentication
      Authority Information Access: 
        OCSP - URI:http://ocsp.digicert.com
        CA Issuers - 

      X509v3 Basic Constraints: critical
  Signature Algorithm: sha256WithRSAEncryption

Table of Contents

 About This Book

 Introduction to Linux Systems

 Process Management

 Files and Directories

Running Apache HTTP Server (httpd) on Linux Systems

 What Is Apache HTTP Server "httpd"

 Install Apache HTTP Server "httpd"

 Enable Remote Access to "httpd" Service

 Publish Home Page index.html

 "apachectl status/start/stop" Commands

 Verify Apache HTTP Server "httpd" Environment

 Requirements for Supporting HTTPS on Apache

Web Server Certificate and Required Fields

 Apache Configuration for HTTPS Protocol

 Common Issues with Apache HTTPS Support

 Listen to Non-Standard Ports with Apache

 Running Apache Tomcat on Linux Systems

 Running PHP Scripts on Linux Systems

 Running MySQL Database Server on Linux Systems

 Running Python Scripts on Linux Systems

 Conda - Environment and Package Manager

 GCC - C/C++ Compiler

 OpenJDK - Open-Source JDK

 Graphics Environments on Linux

 SquirrelMail - Webmail in PHP

 Tools and Utilities


 Full Version in PDF/EPUB