I have about 25 virtual servers (domains) on my Ubuntu 10.04 Virtualmin managed server. I can successfully create subdomains on all of them except for one: theportlandcompany.com
When I create subdomains on this domain (which is currently pointed to a different server since I couldn’t get this working) they are displaying content from the parent domains httpdocs folder instead of it’s respective subdomain httpdocs folder.
The only thing that I can think would cause this issue, beside improperly pointed DNS records, is that I created this domain, then edited again later and checked the enable SSL option, then deleted it, recreated the domain (this time checking the enable SSL option during it’s creation) and then added the subdomains. I’ve already had problems with this option where, when enabled AFTER the domain is created, it points to /var/www instead of the domains respective httpdocs - so it seems plausible that this issue is somehow related as well.
Thanks for your help!
Yeah, that is odd. Does your server only have one IP address? The issue you’re describing could happen if requests are getting to your server, but on an IP other than what Apache is expecting.
You may also want to look at your config files in /etc/apache2/sites-enabled, and make sure only one of them mention your sub-domain that you’re having problems with. If you see references to your sub-domain in more than one config file, that could explain what you’re seeing.
Ah, that’s a great question. Yes, we have five IP addresses and this website is not using the one that is primarily associated with the server. I noticed that some domains that are using SSL with a different IP address also aren’t sending out email notifications.
Could you elaborate on why this would cause a problem and potentially offer a solution? Thank you!!
I did check site-enabled and there weren’t duplicates or anything else unusual.
Okay, I resolved the issue. It turns out that when you create a new sub domain whose parent has an IP different from the primary one associated with the server that you must make it “Public” (Server Configuration -> Change IP -> Button in lower left that says “Convert Private Address to Shared”) and then, when you’re creating the new virtual sub server, expand “IP address and forwarding” -> “Shared, on non-default IP” -> And then select the desired IP address.