Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Well, this problem is relatively hard to describe. I installed Webmin+Virtualmin in a server. I have multiple IP addresses in the server (two NICs bonded).

Let's assume that the network is 1.1.1.1/29.

The Virtual Servers now are like this:

masterdomain.com:

  • Listens to all addresses (1.1.1.2 to 1.1.1.6)
  • Self-signed certificate for SSL (issuer masterdomain.com)

seconddomain.com:

  • Listens to 1.1.1.4
  • Self-signed certificate for SSL (issuer seconddomain.com)

You see, there's no problem at all using HTTPS at masterdomain.com (other than complains because the certificate isn't signed by a CA). TLSv1 says Server Hello, exchanges key, and it's done.

The problem comes with https://1.1.1.4/ or https://seconddomain.com/. Firefox says ssl_error_rx_record_too_long.

I used Wireshark to examine the packets, and found that it (seconddomain.com or 1.1.1.4) never sends the key or the 'Hello', but the index.php of the DocumentRoot of seconddomain.com within the TLSv1 response. Wireshark classifies it as Alert (Level: Fatal, Description: Unexpected Message). The first 66 bytes conform with the expected header, and then Apache inserts the processed index.php -> "<html><head><title>Main page of seconddomain.com!![...]" instead of the SSL key. That's in the packet were it is supposed to put the "Server Hello" (after a correct "Client Hello" from the client).

I don't know how to solve the issue, which is most likely related to the VirtualHost configuration. But the VirtualHost of seconddomain.com has the same configuration than masterdomain.com! -other than listening to only one IP instead of * (and of course, the SSL key, the SuexecGroup and the DocumentRoot fields are different).

Thanks in advance.

share|improve this question
    
Can you paste in the copy of your VirtualHost Configuration? –  Rilindo Dec 23 '11 at 21:41
    
Hi Rilindo, thanks for your comment. I already solved the issue. –  huff Dec 23 '11 at 21:43
    
Great. Make sure to accept your post and close it. –  Rilindo Dec 23 '11 at 21:44
    
I have to wait 2 days for accepting my own answer... but sure, I will close it. If you think it may not help others, feel free to delete it. Salud! –  huff Dec 23 '11 at 21:49

1 Answer 1

I found the mistake. You see, Virtualmin generated this in apache2.conf:

NameVirtualHost 1.1.1.2:80
NameVirtualHost 1.1.1.2:443
NameVirtualHost 1.1.1.4

Therefore not distinguishing between the https and http ports of 1.1.1.4. Replaced it for:

NameVirtualHost 1.1.1.2:80
NameVirtualHost 1.1.1.2:443
NameVirtualHost 1.1.1.4:80
NameVirtualHost 1.1.1.4:443

To solve the problem.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.