Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8853055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:33:19+00:00 2026-06-14T13:33:19+00:00

I have a CentOS/Apache+OpenSSL server. I host two domain names with wildcard sub domains

  • 0

I have a CentOS/Apache+OpenSSL server. I host two domain names with wildcard sub domains (application logic surfaces the correct site), e.g.

https://*.testing1.com

https://*.testing2.com

It works great over HTTP:-

   <VirtualHost *:80>
  # Admin email, Server Name (domain name) and any aliases
  ServerAdmin webmaster@testing1.com
  ServerName  testing1.com
  ServerName  testing2.com

  ServerAlias *.testing1.com *.testing2.com

  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.html index.php
  DocumentRoot /home/app/public_html/public

</VirtualHost>

I’ve purchased two Wildcard SSL certificated for both testing1.com and testing2.com, but I’m unsure how to set it up in this structure:-

    <VirtualHost *.testing1.com:443>
     SSLEngine On
     SSLCertificateFile /etc/httpd/ssl/*.testing1.com.crt
     SSLCertificateKeyFile /etc/httpd/ssl/*.testing1.com.key
     SSLCACertificateFile /etc/httpd/ssl/geotrust.cer

     ServerAdmin john@testing1.com
     ServerName testing1.com
     ServerAlias *.testing1.com

        DirectoryIndex index.html index.php
        DocumentRoot /home/app/public_html/public

  </VirtualHost>

   <VirtualHost *.testing2.com:443>
     SSLEngine On
     SSLCertificateFile /etc/httpd/ssl/*.testing2.com.crt
     SSLCertificateKeyFile /etc/httpd/ssl/*.testing2.com.key
     SSLCACertificateFile /etc/httpd/ssl/geotrust.cer

     ServerAdmin john@testing2.com
     ServerName testing2.com
     ServerAlias *.testing2.com

        DirectoryIndex index.html index.php
        DocumentRoot /home/app/public_html/public

  </VirtualHost>

The above for the SSL doesn’t work, with the *.testing1.com definition, nor with just testing1.com.

I will also need to repeat this for testing2.com

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T13:33:20+00:00Added an answer on June 14, 2026 at 1:33 pm

    Name-based virtualhosts and SSL wil only work if all the virtualhosts are within the same domain and you have a wildcard SSL certificate for that domain.

    But you have 2 different domains.

    In this case it will only work if you give each SSL-enabled virtualhost it’s own IPaddress.
    So you should use IP-based virtualhosts, not Name-based.

    Explanation:
    The ServerName which is requested, is contained in the HTTP request headers, but before that the SSL encryption must be already setup. So the ServerName is only available after the encryption has been setup. Therefore Apache can never know which SSL certificate te serve up and wil just use the first one available on that particular IPaddress.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two servers: Fedora running Apache/2.2.14 (old server) CentOs running Apache/2.2.3 (new server)
I would like to enable SOAP on my PHP5/Centos/Apache server. I have full access
I have a web site hosted in a CentOS 5-Plesk-Apache server. I have recently
I have php 5.1.6 running on my CentOS 5 server running Apache 2.2.3 I
I have just installed CentOS, Apache and PHP. When I visit my site http://example.com/myapp/
I have the following: running eclipse-indigo in CentOS 6.2 , I also installed apache-ant-1.8.4
I have a CentOS 5.8 server and am planning to install a later version
I have a centos server and would like to install selenium, primarily for taking
We have a CentOS server with 2 ethernet adapters. Both of these adapters have
I have two websites: one with Lighttpd with PHP and second with Apache and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.