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 7003651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:05:48+00:00 2026-05-27T21:05:48+00:00

I have 2 sites defined in a file called virtualhosts.conf, loaded at the end

  • 0

I have 2 sites defined in a file called virtualhosts.conf, loaded at the end of httpd.conf.

They both have the format of:

<VirtualHost IP:80>
  DocumentRoot D:/Site/A/
  ...
</VirtualHost>

<VirtualHost IP:443>
  DocumentRoot D:/Site/A/
  ...
</VirtualHost>

<VirtualHost IP__2:80>
  DocumentRoot D:/Site/B/
  ...
</VirtualHost>

<VirtualHost IP__2:443>
  DocumentRoot D:/Site/B/
  ...
</VirtualHost>

If I load https://sitea.com, with the above config, it loads just fine. If I load https://siteb.com with the above config though, it breaks, saying that siteb is identifying itself as sitea. If I flip the order of the entries:

<VirtualHost IP__2:80>
  DocumentRoot D:/Site/B/
  ...
</VirtualHost>

<VirtualHost IP__2:443>
  DocumentRoot D:/Site/B/
  ...
</VirtualHost>

<VirtualHost IP:80>
  DocumentRoot D:/Site/A/
  ...
</VirtualHost>

<VirtualHost IP:443>
  DocumentRoot D:/Site/A/
  ...
</VirtualHost>

Now, siteb loads just fine, but sitea throws an error that it is identifying itself as siteb.

What is going on? It seems like Apache is defaulting to the ‘top’ entry in the file, even though both seem to be valid, for their domains, if they are first.

EDIT: The top of my httpd.conf:

Listen 80
Listen 443

NameVirtualHost IP.50:80
NameVirtualHost IP.50:443

NameVirtualHost IP.51:80
NameVirtualHost IP.51:443

NameVirtualHost IP.52:80
NameVirtualHost IP.52:443

NameVirtualHost IP.53:80
NameVirtualHost IP.53:443

NameVirtualHost IP.54:80
NameVirtualHost IP.54:443

NameVirtualHost IP.55:80
NameVirtualHost IP.55:443

NameVirtualHost IP.56:80
NameVirtualHost IP.56:443
  • 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-05-27T21:05:48+00:00Added an answer on May 27, 2026 at 9:05 pm

    SSL is established ahead of HTTP request and the server doesn’t know whose certificate to present when it receives the request. This problem doesn’t have general solution other than have a dedicated IP for each secure domain. And BTW your question is off-topic on StackOverflow.

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

Sidebar

Related Questions

I have a function called get_header() which includes the header file in a template
I have a view where I defined sizes using dip. I want to include
We have a composite primary key for the site table defined below. Functionally, this
I have a view defined for a url 'site/main/'. I would like to be
Multiple sites have buttons where you can tweet, digg, etc. On this page you'll
I have several sites where users can send me email through an html form
I would like to have a function called in an onclick handler, within an
I'm coding a web site and I have a php fonction called site_nav.php which
I currently have a simple model defined, with a photoupload feature using django thumbnails
Let's say that I have this website file root structure: frontend /home/username/public_html/ backend /home/username/public_html/admin/

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.