Tomcat hosting multiple virtual host with single SSL certificate
up vote
0
down vote
favorite
I have a server hosting multiple web applications using Tomcat 8.0, each one in their virtual host, for example
Virtual Host "a.example.com" points to https://example.com/a
Virtual Host "b.example.com" points to https://example.com/b
My question is that, is there a way I could setup my multiple virtual hosts to use my single SSL certificate? Do i need tomcat SNI support for that?
ssl tomcat configuration
add a comment |
up vote
0
down vote
favorite
I have a server hosting multiple web applications using Tomcat 8.0, each one in their virtual host, for example
Virtual Host "a.example.com" points to https://example.com/a
Virtual Host "b.example.com" points to https://example.com/b
My question is that, is there a way I could setup my multiple virtual hosts to use my single SSL certificate? Do i need tomcat SNI support for that?
ssl tomcat configuration
Sure, you just need to have two subjectAlternativeNames in the certificate, one witha.example.com
and one withb.example.com
. Tomcat must support SNI as well. See this answer.
– James K Polk
Nov 19 at 17:13
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a server hosting multiple web applications using Tomcat 8.0, each one in their virtual host, for example
Virtual Host "a.example.com" points to https://example.com/a
Virtual Host "b.example.com" points to https://example.com/b
My question is that, is there a way I could setup my multiple virtual hosts to use my single SSL certificate? Do i need tomcat SNI support for that?
ssl tomcat configuration
I have a server hosting multiple web applications using Tomcat 8.0, each one in their virtual host, for example
Virtual Host "a.example.com" points to https://example.com/a
Virtual Host "b.example.com" points to https://example.com/b
My question is that, is there a way I could setup my multiple virtual hosts to use my single SSL certificate? Do i need tomcat SNI support for that?
ssl tomcat configuration
ssl tomcat configuration
asked Nov 19 at 13:27
Kaj Risberg
13714
13714
Sure, you just need to have two subjectAlternativeNames in the certificate, one witha.example.com
and one withb.example.com
. Tomcat must support SNI as well. See this answer.
– James K Polk
Nov 19 at 17:13
add a comment |
Sure, you just need to have two subjectAlternativeNames in the certificate, one witha.example.com
and one withb.example.com
. Tomcat must support SNI as well. See this answer.
– James K Polk
Nov 19 at 17:13
Sure, you just need to have two subjectAlternativeNames in the certificate, one with
a.example.com
and one with b.example.com
. Tomcat must support SNI as well. See this answer.– James K Polk
Nov 19 at 17:13
Sure, you just need to have two subjectAlternativeNames in the certificate, one with
a.example.com
and one with b.example.com
. Tomcat must support SNI as well. See this answer.– James K Polk
Nov 19 at 17:13
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
In order to connect to a.example.com
, you'll need a valid certificate for a.example.com
. Same for any connection to b.example.com
- and as I assume that SNI is ubiquituous by now, I don't know if the answer "yes" would require you to do something different than "no".
In the very special case that you use in your question, you can also work with wildcard certificates for *.example.com
- ideally with an alternative name for example.com
. It depends on the certification authority that you intend to use if it's available and how much you'll have to pay for it. Of course, if this was only an example, and the actual domain names are more diverse, it's no longer an option.
Just assume you need SNI - there's no problem using it.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
In order to connect to a.example.com
, you'll need a valid certificate for a.example.com
. Same for any connection to b.example.com
- and as I assume that SNI is ubiquituous by now, I don't know if the answer "yes" would require you to do something different than "no".
In the very special case that you use in your question, you can also work with wildcard certificates for *.example.com
- ideally with an alternative name for example.com
. It depends on the certification authority that you intend to use if it's available and how much you'll have to pay for it. Of course, if this was only an example, and the actual domain names are more diverse, it's no longer an option.
Just assume you need SNI - there's no problem using it.
add a comment |
up vote
1
down vote
In order to connect to a.example.com
, you'll need a valid certificate for a.example.com
. Same for any connection to b.example.com
- and as I assume that SNI is ubiquituous by now, I don't know if the answer "yes" would require you to do something different than "no".
In the very special case that you use in your question, you can also work with wildcard certificates for *.example.com
- ideally with an alternative name for example.com
. It depends on the certification authority that you intend to use if it's available and how much you'll have to pay for it. Of course, if this was only an example, and the actual domain names are more diverse, it's no longer an option.
Just assume you need SNI - there's no problem using it.
add a comment |
up vote
1
down vote
up vote
1
down vote
In order to connect to a.example.com
, you'll need a valid certificate for a.example.com
. Same for any connection to b.example.com
- and as I assume that SNI is ubiquituous by now, I don't know if the answer "yes" would require you to do something different than "no".
In the very special case that you use in your question, you can also work with wildcard certificates for *.example.com
- ideally with an alternative name for example.com
. It depends on the certification authority that you intend to use if it's available and how much you'll have to pay for it. Of course, if this was only an example, and the actual domain names are more diverse, it's no longer an option.
Just assume you need SNI - there's no problem using it.
In order to connect to a.example.com
, you'll need a valid certificate for a.example.com
. Same for any connection to b.example.com
- and as I assume that SNI is ubiquituous by now, I don't know if the answer "yes" would require you to do something different than "no".
In the very special case that you use in your question, you can also work with wildcard certificates for *.example.com
- ideally with an alternative name for example.com
. It depends on the certification authority that you intend to use if it's available and how much you'll have to pay for it. Of course, if this was only an example, and the actual domain names are more diverse, it's no longer an option.
Just assume you need SNI - there's no problem using it.
answered Nov 19 at 14:33
Olaf Kock
36.7k74476
36.7k74476
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53375659%2ftomcat-hosting-multiple-virtual-host-with-single-ssl-certificate%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Sure, you just need to have two subjectAlternativeNames in the certificate, one with
a.example.com
and one withb.example.com
. Tomcat must support SNI as well. See this answer.– James K Polk
Nov 19 at 17:13