Apache 2.4 / Windows / Multi-IP based VHosts for SSL/Non-SSLApache 2.2.14: SSLCARevocation locationSSL,...
Closure of presentable objects under finite limits
Linear regression when Y is bounded and discrete
What is the wife of a henpecked husband called?
How can I handle a player who pre-plans arguments about my rulings on RAW?
Make me a metasequence
Whom do I have to contact for a ticket refund in case of denied boarding (in the EU)?
Which aircraft had such a luxurious-looking navigator's station?
Multiplication via squaring and addition
Is there any relevance to Thor getting his hair cut other than comedic value?
Did 5.25" floppies undergo a change in magnetic coating?
How do ISS astronauts "get their stripes"?
Proving a mapping is a group action
Is there a German word for “analytics”?
Called into a meeting and told we are being made redundant (laid off) and "not to share outside". Can I tell my partner?
Book where the good guy lives backwards through time and the bad guy lives forward
I am on the US no-fly list. What can I do in order to be allowed on flights which go through US airspace?
When should a commit not be version tagged?
How to deny access to SQL Server to certain login over SSMS, but allow over .Net SqlClient Data Provider
Why do members of Congress in committee hearings ask witnesses the same question multiple times?
Is there a low-level alternative to Animate Objects?
When was drinking water recognized as crucial in marathon running?
Where is this triangular-shaped space station from?
What am I? I am in theaters and computer programs
Can you use a beast's innate abilities while polymorphed?
Apache 2.4 / Windows / Multi-IP based VHosts for SSL/Non-SSL
Apache 2.2.14: SSLCARevocation locationSSL, Apache, and Subdomains on a Static IPfirst time setting up ssl, tutorials haven't been too helpfulediting apache vhosts and ubuntu hosts file?Trouble starting apache with two virtual hosts, 2 ip's and 2 ssl'sVirtual hosts with port 80 & 443 not workingSSL Certificate error in Apache 2.4Unbuntu server running Apache with an SSL Cert IssueConnection refused on HTTP and HTTPS after SSL installationApache SSL and non SSL sites VirtualHosts not working correctly
I'm setting up my Apache server so that it has 2 internal IP addresses for the NIC. One will be bound to all port 80 traffic, and the other to port 443 traffic. The reason I'm doing this is that when I browse to one of my sites that is not SSL enabled, Apache tries to serve up the first certificate it finds in the VHosts file, even though it doesn't belong to the site I'm requesting. This causes an SSL warning because it does not match the domain.
From what I understand, the best way to fix this problem is to set up the NIC so that it has 2 IP addresses. Here is what I have so far.
NIC Card Setup Static IPs:
10.0.0.2 and 10.0.0.4.
Both on same Subnet mask of 255.255.255.0.
I want to set up my Apache so that 10.0.0.2 will handle port 80 traffic, and any requests for HTTPS for all sites defined for that IP will fail. All HTTPS traffic will go through 10.0.0.4.
I have the following in my httpd.conf file
Listen 10.0.0.2:80 Listen 10.0.0.4:443
NameVirtualHost 10.0.0.2:80 NameVirtualHost 10.0.0.4:443
In my vhosts.conf file, I have my sites set up like this.
HTTP VIRTUAL HOSTS
ServerName domainwhatever.com
...site declaration stuff here...
# HTTPS VIRTUAL HOSTS
<VirtualHost 10.0.0.4:443>
DocumentRoot "C:sitessite1.com"
ServerName site1.com
SSLEngine on
SSLCertificateFile "c:sslsite1.comCERTFILE.crt"
SSLCertificateKeyFile "c:sslsite1.comCERTFILE.key"
SSLCACertificateFile "c:sslsite1.comBUNDLEFILE.crt" </VirtualHost>
<VirtualHost 10.0.0.4:443>
DocumentRoot "C:sitessite2.com"
ServerName site2.com
SSLEngine on
SSLCertificateFile "c:sslsite2.comCERTFILE.crt"
SSLCertificateKeyFile "c:sslsite2.comCERTFILE.key"
SSLCACertificateFile "c:sslsite2.comBUNDLEFILE.crt" </VirtualHost>
I have quite a bit of HTTP (10.0.0.2:80) VHost entries, but only show one in this example. Right now I have two sites that are HTTPS and need to use the 10.0.0.4 IP, but want to be able to add more in the future.
I can't browse the https sites. Chrome does not connect. Any idea where I'm going wrong here???
apache-2.2 apache-2.4
add a comment |
I'm setting up my Apache server so that it has 2 internal IP addresses for the NIC. One will be bound to all port 80 traffic, and the other to port 443 traffic. The reason I'm doing this is that when I browse to one of my sites that is not SSL enabled, Apache tries to serve up the first certificate it finds in the VHosts file, even though it doesn't belong to the site I'm requesting. This causes an SSL warning because it does not match the domain.
From what I understand, the best way to fix this problem is to set up the NIC so that it has 2 IP addresses. Here is what I have so far.
NIC Card Setup Static IPs:
10.0.0.2 and 10.0.0.4.
Both on same Subnet mask of 255.255.255.0.
I want to set up my Apache so that 10.0.0.2 will handle port 80 traffic, and any requests for HTTPS for all sites defined for that IP will fail. All HTTPS traffic will go through 10.0.0.4.
I have the following in my httpd.conf file
Listen 10.0.0.2:80 Listen 10.0.0.4:443
NameVirtualHost 10.0.0.2:80 NameVirtualHost 10.0.0.4:443
In my vhosts.conf file, I have my sites set up like this.
HTTP VIRTUAL HOSTS
ServerName domainwhatever.com
...site declaration stuff here...
# HTTPS VIRTUAL HOSTS
<VirtualHost 10.0.0.4:443>
DocumentRoot "C:sitessite1.com"
ServerName site1.com
SSLEngine on
SSLCertificateFile "c:sslsite1.comCERTFILE.crt"
SSLCertificateKeyFile "c:sslsite1.comCERTFILE.key"
SSLCACertificateFile "c:sslsite1.comBUNDLEFILE.crt" </VirtualHost>
<VirtualHost 10.0.0.4:443>
DocumentRoot "C:sitessite2.com"
ServerName site2.com
SSLEngine on
SSLCertificateFile "c:sslsite2.comCERTFILE.crt"
SSLCertificateKeyFile "c:sslsite2.comCERTFILE.key"
SSLCACertificateFile "c:sslsite2.comBUNDLEFILE.crt" </VirtualHost>
I have quite a bit of HTTP (10.0.0.2:80) VHost entries, but only show one in this example. Right now I have two sites that are HTTPS and need to use the 10.0.0.4 IP, but want to be able to add more in the future.
I can't browse the https sites. Chrome does not connect. Any idea where I'm going wrong here???
apache-2.2 apache-2.4
What is the actual error message you are getting?
– Jenny D
5 hours ago
your "VirtualHost" directive contains 10.0.0.0 instead of 10.0.0.4 so the VirtualHosts don't match.
– Andreas Rogge
5 hours ago
@JennyD - not getting an error message, but when I try to browse to one of my SSL sites it doesn't connect. Just tries and tries and fails to connect.
– Phil
5 hours ago
@AndreasRogge - that was a copy/paste mistake. In my real vhost they are correct and I've updated my example to fix too.
– Phil
5 hours ago
add a comment |
I'm setting up my Apache server so that it has 2 internal IP addresses for the NIC. One will be bound to all port 80 traffic, and the other to port 443 traffic. The reason I'm doing this is that when I browse to one of my sites that is not SSL enabled, Apache tries to serve up the first certificate it finds in the VHosts file, even though it doesn't belong to the site I'm requesting. This causes an SSL warning because it does not match the domain.
From what I understand, the best way to fix this problem is to set up the NIC so that it has 2 IP addresses. Here is what I have so far.
NIC Card Setup Static IPs:
10.0.0.2 and 10.0.0.4.
Both on same Subnet mask of 255.255.255.0.
I want to set up my Apache so that 10.0.0.2 will handle port 80 traffic, and any requests for HTTPS for all sites defined for that IP will fail. All HTTPS traffic will go through 10.0.0.4.
I have the following in my httpd.conf file
Listen 10.0.0.2:80 Listen 10.0.0.4:443
NameVirtualHost 10.0.0.2:80 NameVirtualHost 10.0.0.4:443
In my vhosts.conf file, I have my sites set up like this.
HTTP VIRTUAL HOSTS
ServerName domainwhatever.com
...site declaration stuff here...
# HTTPS VIRTUAL HOSTS
<VirtualHost 10.0.0.4:443>
DocumentRoot "C:sitessite1.com"
ServerName site1.com
SSLEngine on
SSLCertificateFile "c:sslsite1.comCERTFILE.crt"
SSLCertificateKeyFile "c:sslsite1.comCERTFILE.key"
SSLCACertificateFile "c:sslsite1.comBUNDLEFILE.crt" </VirtualHost>
<VirtualHost 10.0.0.4:443>
DocumentRoot "C:sitessite2.com"
ServerName site2.com
SSLEngine on
SSLCertificateFile "c:sslsite2.comCERTFILE.crt"
SSLCertificateKeyFile "c:sslsite2.comCERTFILE.key"
SSLCACertificateFile "c:sslsite2.comBUNDLEFILE.crt" </VirtualHost>
I have quite a bit of HTTP (10.0.0.2:80) VHost entries, but only show one in this example. Right now I have two sites that are HTTPS and need to use the 10.0.0.4 IP, but want to be able to add more in the future.
I can't browse the https sites. Chrome does not connect. Any idea where I'm going wrong here???
apache-2.2 apache-2.4
I'm setting up my Apache server so that it has 2 internal IP addresses for the NIC. One will be bound to all port 80 traffic, and the other to port 443 traffic. The reason I'm doing this is that when I browse to one of my sites that is not SSL enabled, Apache tries to serve up the first certificate it finds in the VHosts file, even though it doesn't belong to the site I'm requesting. This causes an SSL warning because it does not match the domain.
From what I understand, the best way to fix this problem is to set up the NIC so that it has 2 IP addresses. Here is what I have so far.
NIC Card Setup Static IPs:
10.0.0.2 and 10.0.0.4.
Both on same Subnet mask of 255.255.255.0.
I want to set up my Apache so that 10.0.0.2 will handle port 80 traffic, and any requests for HTTPS for all sites defined for that IP will fail. All HTTPS traffic will go through 10.0.0.4.
I have the following in my httpd.conf file
Listen 10.0.0.2:80 Listen 10.0.0.4:443
NameVirtualHost 10.0.0.2:80 NameVirtualHost 10.0.0.4:443
In my vhosts.conf file, I have my sites set up like this.
HTTP VIRTUAL HOSTS
ServerName domainwhatever.com
...site declaration stuff here...
# HTTPS VIRTUAL HOSTS
<VirtualHost 10.0.0.4:443>
DocumentRoot "C:sitessite1.com"
ServerName site1.com
SSLEngine on
SSLCertificateFile "c:sslsite1.comCERTFILE.crt"
SSLCertificateKeyFile "c:sslsite1.comCERTFILE.key"
SSLCACertificateFile "c:sslsite1.comBUNDLEFILE.crt" </VirtualHost>
<VirtualHost 10.0.0.4:443>
DocumentRoot "C:sitessite2.com"
ServerName site2.com
SSLEngine on
SSLCertificateFile "c:sslsite2.comCERTFILE.crt"
SSLCertificateKeyFile "c:sslsite2.comCERTFILE.key"
SSLCACertificateFile "c:sslsite2.comBUNDLEFILE.crt" </VirtualHost>
I have quite a bit of HTTP (10.0.0.2:80) VHost entries, but only show one in this example. Right now I have two sites that are HTTPS and need to use the 10.0.0.4 IP, but want to be able to add more in the future.
I can't browse the https sites. Chrome does not connect. Any idea where I'm going wrong here???
apache-2.2 apache-2.4
apache-2.2 apache-2.4
edited 4 hours ago
Phil
asked 6 hours ago
PhilPhil
11617
11617
What is the actual error message you are getting?
– Jenny D
5 hours ago
your "VirtualHost" directive contains 10.0.0.0 instead of 10.0.0.4 so the VirtualHosts don't match.
– Andreas Rogge
5 hours ago
@JennyD - not getting an error message, but when I try to browse to one of my SSL sites it doesn't connect. Just tries and tries and fails to connect.
– Phil
5 hours ago
@AndreasRogge - that was a copy/paste mistake. In my real vhost they are correct and I've updated my example to fix too.
– Phil
5 hours ago
add a comment |
What is the actual error message you are getting?
– Jenny D
5 hours ago
your "VirtualHost" directive contains 10.0.0.0 instead of 10.0.0.4 so the VirtualHosts don't match.
– Andreas Rogge
5 hours ago
@JennyD - not getting an error message, but when I try to browse to one of my SSL sites it doesn't connect. Just tries and tries and fails to connect.
– Phil
5 hours ago
@AndreasRogge - that was a copy/paste mistake. In my real vhost they are correct and I've updated my example to fix too.
– Phil
5 hours ago
What is the actual error message you are getting?
– Jenny D
5 hours ago
What is the actual error message you are getting?
– Jenny D
5 hours ago
your "VirtualHost" directive contains 10.0.0.0 instead of 10.0.0.4 so the VirtualHosts don't match.
– Andreas Rogge
5 hours ago
your "VirtualHost" directive contains 10.0.0.0 instead of 10.0.0.4 so the VirtualHosts don't match.
– Andreas Rogge
5 hours ago
@JennyD - not getting an error message, but when I try to browse to one of my SSL sites it doesn't connect. Just tries and tries and fails to connect.
– Phil
5 hours ago
@JennyD - not getting an error message, but when I try to browse to one of my SSL sites it doesn't connect. Just tries and tries and fails to connect.
– Phil
5 hours ago
@AndreasRogge - that was a copy/paste mistake. In my real vhost they are correct and I've updated my example to fix too.
– Phil
5 hours ago
@AndreasRogge - that was a copy/paste mistake. In my real vhost they are correct and I've updated my example to fix too.
– Phil
5 hours ago
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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%2fserverfault.com%2fquestions%2f956701%2fapache-2-4-windows-multi-ip-based-vhosts-for-ssl-non-ssl%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Server Fault!
- 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%2fserverfault.com%2fquestions%2f956701%2fapache-2-4-windows-multi-ip-based-vhosts-for-ssl-non-ssl%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
What is the actual error message you are getting?
– Jenny D
5 hours ago
your "VirtualHost" directive contains 10.0.0.0 instead of 10.0.0.4 so the VirtualHosts don't match.
– Andreas Rogge
5 hours ago
@JennyD - not getting an error message, but when I try to browse to one of my SSL sites it doesn't connect. Just tries and tries and fails to connect.
– Phil
5 hours ago
@AndreasRogge - that was a copy/paste mistake. In my real vhost they are correct and I've updated my example to fix too.
– Phil
5 hours ago