Change IP address for existing virtual server, for SSL

4 posts / 0 new
Last post
#1 Fri, 12/02/2011 - 19:01
robbrandt

Change IP address for existing virtual server, for SSL

I have myself terribly confused about this.

My main virtual server on my server is x.com. I have a virtual server y.com that is the main site for an account. There is a sub-server for that account that is z.com. Originally, I had no SSL and all sites used the same IP address x.x.x.130. After a while I needed to set up SSL for x.com, and that cert is bound to the .130 IP address. Now I need to add SSL to z.com (don't yet care about y.com).

The interface seems straightforward enough. For z.com I can go to Configurable settings and for External IP address I can change it from "same as real (.130)" to the specific new address x.x.x.139. However when I then try and enable SSL, Virtualmin warns me that it is still using .130. If I continue the SSL on x.com is broken, and on y.com it doesn't work either.

I have already set up the new IP address in Webmin as a virtial interface (eth0:5).

I've already done this previously 4 times, although with those I wasn't changing the IP address, I was creating a new site with a different IP address.

Thanks in advance.

Fri, 12/02/2011 - 22:05
andreychek

Howdy,

To change the IP address for that domain, you'd want to go into Server Configuration -> Change IP Address, and set that new IP as a private IP for that domain.

Full details on adding an SSL certificate are here:

http://www.virtualmin.com/documentation/tutorial/how-to-add-an-ssl-certi...

Mon, 12/05/2011 - 01:46
robbrandt

Thanks, that seems to have worked. The domain now knows it's the .139 address, and I've enabled SSL.

However now when I set up my ssl cert - just like my others - apache restart fails. Error message is:

Failed to apply changes :

[Sun Dec 04 23:23:50 2011] [notice] Graceful restart requested, doing restart [Sun Dec 04 23:23:50 2011] [error] (9)Bad file descriptor: apr_socket_accept: (client socket) PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/imap.ini on line 1 in Unknown on line 0 PHP Deprecated: Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/mcrypt.ini on line 1 in Unknown on line 0

I have found that if I go into the site.conf file and comment out "SSLEngine on" it restarts OK. Any suggestions?

Mon, 12/05/2011 - 16:45
robbrandt

Fixed. I googled and found an obscure item that suggested it might be a problem with the cert. I recreated the cert and all is well.

Thanks!

Topic locked