Wildcard Certificates: Create Virtual Server Fails

I have two certificates with example IPs as:

www.domain.com (1.1.1.1)
*.domain.com (2.2.2.2)

and the already-created sub-server:

existing.domain.com (2.2.2.2)

When I try to create a new sub-server, such as:

new.domain.com (2.2.2.2)

I get the error message:

Failed to create virtual server : The IP address is already used by virtual server existing.domain.com

Virtualmin should allow creating multiple sub-servers that share the same IP address.

Some side notes: I also use Pound (www.apsis.ch/pound) for reverse proxy/load balancing/certificate handling outside of Virtualmin.

My current workaround is to manually edit /etc/httpd/conf/httpd.conf and /var/named/chroot/var/named/domain.com.hosts and change the IPs and then restart nameservers. I was thinking that a better workaround might be to modify create-domain.pl and save_domain.cgi to simply not check this condition. Or the GUI could have three radio buttons for Create Virtual Server > Sub-server > IP address and forwarding > Network interface:

O Shared, on IP aa.bb.cc.dd
O Shared, on IP [ ]
O Virtual with IP [ ] ([ ] Already active)

Or still, maybe just making the aa.bb.cc.dd editable:

O Shared, on IP [aa.bb.cc.dd]
O Virtual with IP [ ] ([ ] Already active)

I'm still open to helping... but, would need just a little orientation to get started (like getting code from trunk, and any suggestions you'd want to make)

Status: 
Closed (fixed)

Comments

What you need to do in this case is switch 2.2.2.2 from a IP that is private to existing.domain.com to a shared address. This can be done as follows :

1) On the Edit Virtual Server page for existing.domain.com, change the 'Virtual interface' to 'None' 2) Go to Addresses and Networking -> Shared IP Addresses, and add 2.2.2.2 to the list 3) Go back to the Edit Virtual Server page, and switch the domain to the shared IP 2.2.2.2 4) Create your other domains, also on the shared IP 2.2.2.2

I plan to make this more user-friendly in future to this switching to a shared address isn't needed..

Automatically closed -- issue fixed for 2 weeks with no activity.