Submitted by brucelet on Mon, 03/15/2010 - 12:04
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
Submitted by JamieCameron on Mon, 03/15/2010 - 12:54 Comment #1
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.
Submitted by brucelet on Wed, 03/17/2010 - 12:17 Comment #2
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.
Submitted by andreychek on Wed, 03/17/2010 - 12:24 Comment #3
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.
Submitted by brucelet on Wed, 03/17/2010 - 21:22 Comment #4
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.
Submitted by brucelet on Wed, 03/17/2010 - 21:32 Comment #5
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!
Submitted by brucelet on Thu, 03/18/2010 - 05:35 Comment #6
There are lock files on quite a few files. Is there an easy way to clear them? Can I just delete them?
Submitted by brucelet on Thu, 03/18/2010 - 09:28 Comment #7
By the way, I found out why the domain name change hung in the first place. My secondary DNS server was offline.
Submitted by andreychek on Thu, 03/18/2010 - 10:15 Comment #8
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!
Submitted by JamieCameron on Thu, 03/18/2010 - 12:50 Comment #9
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.
Submitted by brucelet on Tue, 03/23/2010 - 15:58 Comment #10
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
Submitted by JamieCameron on Tue, 03/23/2010 - 16:22 Comment #11
Are you seeing any issues when accessing the websites for those domains? The only one that could possibly be a problem is portal ..
Submitted by brucelet on Wed, 03/24/2010 - 10:07 Comment #12
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?
Submitted by brucelet on Wed, 03/24/2010 - 12:56 Comment #13
I figured it out. It's domain.myserverdomain.com/domains/sub.domain.com
Submitted by JamieCameron on Wed, 03/24/2010 - 16:25 Comment #14
You could also use the Services -> Preview Website feature in Virtualmin.
Submitted by brucelet on Wed, 03/24/2010 - 17:04 Comment #15
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.
Submitted by JamieCameron on Wed, 03/24/2010 - 19:38 Comment #16
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..
Submitted by Issues on Thu, 04/08/2010 - 07:20 Comment #17
Automatically closed -- issue fixed for 2 weeks with no activity.