SSLs for Subdomains

I have an account that wants two different subdomains, each with SSL. portal.domain.com and crm.domain.com. If I create a virtual server for the main domain, can I create two subdomains under it, assign separate IPs, and install different SSLs? If so, can you give me a quick instruction?

Thanks.

Status: 
Closed (fixed)

Comments

This will work fine - you can either get a separate IP for each of the sub-domains and a separate SSL cert for each, or you can get a wildcard cert for *.domain.com that will let the sub-domains and the top-level domain share the same IP.

If I go to Server Configuration->Change Domain Name to change the main domain name for this virtual server (we used a test one at first) and change the directory, will it mess up an existing PHP/MySQL application that is installed? I won't change the username or password.

After I do that, I need to just go to Create Virtual Server->Sub Server and create the crm.domain.com sub server with a fixed IP address, right? Then, I'll repeat it for the other sub domain.

Whether or not that works depends on the particular application in question, as well as how it's currently configured.

To know for certain, you'd want to check with the documentation of your particular web app before making any changes. However it should either work without a problem, or there should be documentation on how to go about configuring your web app for a new domain name.

As far as Virtualmin itself is concerned, that much doesn't matter though.

To assign a new IP to your sub-server, when you create it, simply list the new IP you wish to use in the IP address and forwarding -> Network interface field when creating the domain.

When changing the domain name on the virtual server, the process ran for a long time and did not display a completion message. Now, when I added the two subdomains, I get this message in the middle of the creation messages. I am suspicious that the process of renaming the domain hung while trying to rename the email accounts. What can I do to clean this up? Is the best answer to back up my application, delete this domain, and start over?

Adding to email domains list .. .. Mail for domain failed! : Failed to lock file /etc/postfix/virtual after 5 minutes at /usr/libexec/webmin/web-lib-funcs.pl line 1332.

I also get these messages later in the add sub server process:

Adding new virtual website .. .. Apache website failed! : Failed to lock file /etc/httpd/conf/httpd.conf after 5 minutes at /usr/libexec/webmin/web-lib-funcs.pl line 1332.

Setting up scheduled Webalizer reporting .. .. no logging directive found in Apache configuration!

.. SSL website failed! : Failed to lock file /etc/httpd/conf/httpd.conf after 5 minutes at /usr/libexec/webmin/web-lib-funcs.pl line 1332.

Setting up log file rotation .. .. no logging directive found in Apache configuration!

There are lock files on quite a few files. Is there an easy way to clear them? Can I just delete them?

By the way, I found out why the domain name change hung in the first place. My secondary DNS server was offline.

Yeah, those lock files are stale at this point.

What I would do is:

  • Stop Webmin: /etc/init.d/webmin stop

  • Verify that no Webmin processes are running -- "ps auxw | grep miniserv | grep webmin". If you see any, kill the process(es).

  • Manually remove the lock files

  • Re-start Webmin: /etc/init.d/webmin start

And then, I'd try the re-name process again. Hopefully it'll just work this time around, but let us know if you have any further trouble with that!

You may also want to validate the domain first, in case the rename only partially completed - you can do this at Limits and Validation -> Validate Virtual Servers.

Here's the results for validation of the domain and subdomains. Let me know what I should do to fix it.

crm.revolusun.com All features OK portal.revolusun.com Webalizer reporting : No Apache log found for virtual host portal.revolusun.com Log file rotation : No Apache log found for virtual host portal.revolusun.com revocrm.opensoftwarehost.com All features OK revolusun.com Mail for domain : The mail server is not configured to receive email for revolusun.com Mailman : Apache redirect for /cgi-bin/mailman goes to https://revocrm.com:10000/virtualmin-mailman/unauthenticated/$1.cgihttps://revolusun.com:10000 instead of the correct Virtualmin URL under https://revolusun.com:10000

Are you seeing any issues when accessing the websites for those domains? The only one that could possibly be a problem is portal ..

I ended up deleting and recreating the domain and subdomains. However, I can't figure out how to access the subdomains prior to pointing them to our server. For the main domain I can use domain.myserverdomain.com, but what address format is used to access the subdomains?

I figured it out. It's domain.myserverdomain.com/domains/sub.domain.com

You could also use the Services -> Preview Website feature in Virtualmin.

If the client is hosting the main website at www.domain.com elsewhere, does he just need to add A records to his DNS to point the subdomains to our server? He tried redirects and they just go to the IP address and give a forbidden error.

He should be able to just add an A record like something.domain.com whose IP is the address of that virtual server on your Cloudmin system..

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