Avatar of up-tech
up-tech

asked on 

Apache and HTTPS Odd Behavoir

I have quite a few vhost configurations on my servers, but lets take two for example:

site1.example.com and site2.example.com.

Site 1 vhost:

<VirtualHost *:80>
        ServerName  site1.example.com
        ServerAlias site1.example.com
       .....
</VirtualHost>

Open in new window


Site 2 vhost:
NameVirtualHost *:80
<VirtualHost *:80>
        ServerName site2.example.com
        ServerAlias site2.example.com
        Redirect permanent / https://site2.example.com/
</VirtualHost>

<VirtualHost *:443>
        ServerName  site2.example.com
        ServerAlias site2.example.com

Open in new window


The odd thing is, if I go to https://site1.example.com the server responds using the vhost conf and certificate of the site2 ssl configuration, any ideas?
Apache Web ServerSSL / HTTPS

Avatar of undefined
Last Comment
Dave Baldwin
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Naranthiran D
Naranthiran D
Flag of India image

Did you clear your browser history or cache and try..
Avatar of up-tech
up-tech

ASKER

Thanks Dave.
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

You're welcome.
Apache Web Server
Apache Web Server

The Apache HTTP Server is a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards. Typically Apache is run on a Unix-like operating system, but it is available for a wide variety of operating systems, including Linux, Novell NetWare, Mac OS-X and Windows. Released under the Apache License, Apache is open-source software.

21K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo