: Multi-Domain SSL and redirections I have one server with the main domain being: WebSiteA.com. I've got 2 others domains on the same server: WebSiteB.com and WebsiteC.com. I want to have one
I have one server with the main domain being: WebSiteA.com.
I've got 2 others domains on the same server: WebSiteB.com and WebsiteC.com. I want to have one website architecture with 3 different sections, with 3 differents domains.
So, when someone visits WebsiteA.com/mycategory I want them to see WebSiteB.com on this page and all the others in this category.
So this :
WebsiteA.com/mycategory/page1
WebsiteA.com/mycategory/page2
WebsiteA.com/mycategory/section/page3
Becomes this :
WebsiteB.com/page1
WebsiteB.com/page2
WebsiteB.com/section/page3
Problem 1:
I first tried to change the DNS in the WebsiteB.com domain to point to WebsiteA.com. It works, but for the entire site. (I suppose I should use alias instead to limit to one section?)
Problem 2: I have an SSL setup on WebsiteA.com, but when I'm trying to reach the page with WebsiteB.com, I receive an error.
So I suppose I should use a Multi-Domain (UCC) SSL certificate?
More posts by @Deb1703797
2 Comments
Sorted by latest first Latest Oldest Best
To get a successful connection to a https website you need the proper certificate(s). Only after you got the https connection you can deal with such things as documentroot or redirects.
This means you either have to get a multi-domain certificate which contains all the sites, our you have to get different certificates for each of the sites. In the case of multiple certificates you would either need to host each of the sites on a different IP address, or you have to use SNI (server name indication), where you can host multiple https domains on the same IP. But, SNI must be supported on the browser site (the browser sends the expected hostname inside the https handshake) and while all newer browsers support it, IE8 and lower on Windows XP does not and also lots of non-browser applications support ist.
So a multi-domain certificate might be the better, but probably more expensive choice.
You will need 3 different SSL certificates with 3 different domains. You can use a wild card certificate if these are sub domains. (eg. site1.example.com, site2.example.com, site3.example.com)
For WebsiteB.com in your example you could change the document root to the /mycategory/ directory. Apache used to (may still) complain about sites sharing root directories but these may not be considered the same. It still worked - just issues a warning when starting or reloading.
#WebsiteA .com:
DocumentRoot /var/www/websitea.com
#WebsiteB .com:
DocumentRoot /var/www/websitea.com/mycategory
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.