DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
  1. DZone
  2. Software Design and Architecture
  3. Security
  4. How to Create CSR and Install a Wildcard SSL Certificate on Apache Using OpenSSL

How to Create CSR and Install a Wildcard SSL Certificate on Apache Using OpenSSL

Want to learn how to create a CSR and install a wildcard SSL certificate? Check out this post on how to do this using the Open SSL and Apache web server.

Jim Aron user avatar by
Jim Aron
·
Sep. 26, 18 · Tutorial
Like (3)
Save
Tweet
Share
56.46K Views

Join the DZone community and get the full member experience.

Join For Free

This article is an end-to-end demonstration of steps to build a CSR for wildcard SSL certificates using OpenSSL and then a complete process of installation of a certificate on the Apache web server. This guide will assure a successful configuration of a website with HTTPS.

Let’s get into the first phase where we will show you how to create CSR using OpenSSL for a wildcard SSL certificate.

Steps for Generating a CSR for Wildcard SSL on Apache Web Server Using OpenSSL

Step 1:  Access your terminal client (ssh) on your web server.

Step 2:  Enter the following command: openssl req –new –newkey rsa:2048 –nodes –keyout server.key –out server.csr

Note: Change the server name in a command with the original server name.

Step 3:  Enter the name of a fully qualified domain name (FQDN) using an asterisk mark. For example; *.example.com.

Note: We are generating a CSR for a wildcard certificate, hence an asterisk mark is required.

Step 4:  Enter the prerequisite details of the organization, geographical information, etc.

Step 5:  That’s it! You are done with OpenSSL CSR for a wildcard SSL certificate.

Note: Along with a CSR file, you will have one more file called the “Private Key” that you need to keep on the same machine where you generated the Certificate Signing Request file.

Now, we are heading to the second phase where we will demonstrate Apache Wildcard SSL Certificate Installation.

Steps for Installing a Wildcard Certificate on Apache Web Server

Step 1: Download the set of your files from the Certificate Authority interface. The folder will contain two important files: the intermediate certificate (RapidSSLCA.crt) and primary certificate (your_domain_name.crt).

Step 2: Copy these files on your server along with the Private Key file.

Step 3:  Discover Apache httpd.conf — the configuration of Apache. You will need to edit it.

Note: You would have Apache’s configuration file named httpd.conf or apache2.conf on the locations /etc/httpd/ or /etc/apache2/.

Step 4:  Validate the <VirtualHost> block for further SSL configuration.

Note: You could prefer both the version of a website, like if want to access a website through a secure way and at the same time, a website should be accessible non-secure way too.

Step 5:  Configure the <VirtualHost> block for secure connection. Here is the sample example of the SSL-enabled <VirtualHost> block, and you need to follow the same for yours.

<VirtualHost 192.168.0.1:443>

    DocumentRoot /var/www/html2

    ServerName www.yourdomain.com

        SSLEngine on

        SSLCertificateFile /path/to/your_domain_name.crt

        SSLCertificateKeyFile /path/to/your_private.key

        SSLCertificateChainFile /path/to/RapidSSLCA.crt

    </VirtualHost>


Note: Double check the naming conventions for files — your files should be named properly.

Step 6:  That’s it. Restart your Apache server and check wildcard SSL certificate installation through SSL checker tool.

OpenSSL

Published at DZone with permission of Jim Aron. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • 3 Main Pillars in ReactJS
  • Shift-Left: A Developer's Pipe(line) Dream?
  • Introduction to Spring Cloud Kubernetes
  • OpenVPN With Radius and Multi-Factor Authentication

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: