I have a single IP server hosting multiple website. I set up a new virtual server “domain.com” and it’s working as intended. I created an alias “domain.org” for this server using virtualmin -> create virtual server -> Alias of domain.com and enabling “Setup DNS Zone” feature only.
Problem:
[1] - When users type domain.org on their browser, the first virtual server in my Webmin->Servers->Apache Webserver list is rendered.
[2] - emails going to @domain.ca bounce back and are not routed to @domain.com
Questions:
While using the alias:
[a] - How do I go about getting domain.org to serve domain.com directly?
[b] - How to route emails sent to domain.org to domain.com?
Note: I know I can do it the hard way and set it up as virtual server, create a redirect and just forward emails but I’d love to do it the right way rather than mickey mouse style. Thanks!!
Thanks for the reply. That’s what I thought the alias would do but unfortunately it doesn’t. As I mentioned, the alias domain.org returns the first website I have in my Apache Webserve. As a test, in the Apache Directives I switched the order of the 1st and 2nd website. As I suspected, the new top website in the list shows up when domain.org is entered in a browser. It feels as if when the alias doesnt know where to point, it just defaults to the top website in Apache Webserver list.
In regards to your second question, no “Mail for Domain” is not enabled. However, I just turned it on and the email routing works. Thank you for that.
Ah, I think I misunderstood what you were saying regarding the website. Or actually, I probably just wasn’t thinking right when I read what you described, as my point doesn’t make any sense
Let’s try again!
It sounds like Apache doesn’t know about your alias.
The simplest possibility here is that the “Apache website” option isn’t enabled.
Can you verify that it is indeed set for the alias?
If it is enabled – what distro/version is it that you’re using there?
The simplest possibility it was indeed. It’s working now Eric. Thank you very much!
For anyone reading this, while having the alias virtual server selected, I ticked Apache Website in virtualmin -> Edit Virtual Server -> Enabled Features