This website is deprecated, and remains online only for historic access to old issues and docs for historic versions of Virtualmin. It has been unmaintained for several years, and should not be relied on for up-to-date information. Please visit www.virtualmin.com instead.
Howdy,
Hmm, is there any chance you could share the two domain names in question?
I'm curious if there's a DNS error of some sort that's causing the problem you're seeing.
The only other thing you might check, is to look in $HOME/logs/access_log to make sure you see an entry there when accessing the alias domain.
-Eric
Hi Eric
Thanks for your reply. The domains are www.uniqbuy.com and the alias www.uniqbuy.co.uk
Not sure what is causing the issue but I have added these rewrite rules in httpd.conf and it seems to have gotten around the issue.
RewriteCond %{HTTP_HOST} ^uniqbuy.co.uk [NC] RewriteRule ^(.)$ http://www.uniqbuy.com$1 [L,R=301] RewriteCond %{HTTP_HOST} =www.uniqbuy.co.uk RewriteRule ^(.) http://www.uniqbuy.com$1 [R]
Thanks Naz
Howdy,
Hmm, as I access both of the domains you mentioned above, it takes me to the same website.
I'm not seeing any errors with either domain.
Are you still seeing an error when accessing the alias? If so, I'm wondering if you're experiencing a DNS caching issue.
-Eric
Hi Eric
It was not working using the alias tutorial when I posted the question.
But, then I added the following code to httpd.conf and it seems to have corrected it:
RewriteCond %{HTTP_HOST} ^uniqbuy.co.uk [NC]
RewriteRule ^(.)$ http://www.uniqbuy.com$1 [L,R=301]
RewriteCond %{HTTP_HOST} =www.uniqbuy.co.uk
RewriteRule ^(.) http://www.uniqbuy.com$1 [R]
However, not sure this is the recommended way of doing things.
Nuts, my apologies, I missed the rest of your update when I responded. You did indeed say all that.
I was so excited when I saw the two domain names that I raced off and started testing :-)
I'm not quite sure why it wasn't working at the moment... however, there's nothing wrong with adding those rules to your httpd.conf file.
Those will also be included with any Virtualmin backups you make, as it makes a backup of the Apache config for your domain.
You should be good to go!
-Eric