absolute newbie question -- cname redirect

5 posts / 0 new
Last post
#1 Fri, 04/09/2010 - 10:42
mimetic2

absolute newbie question -- cname redirect

Hello,

I'm an absolute virtualmin newbie. I came from cPanel and per the developer we outsourced to set up the server, he wanted virtualmin, so virtualmin he got :).

Currently I've added a CDN. SO i want to make a subdomain cdn.mydomain.com and have the cdn.mydomain.com CNAME point to a different URL.

I have absolutely zero idea how to do this. I tried to search the site and I feel this might be too newbie of a question. I dont want to play around with it either because virtualmin is too powerful and I think i'll break something. My developer is quite expensive so I'm hoping one of you fine people will help me :).

Thanks for taking the time!

Fri, 04/09/2010 - 10:51
andreychek

Howdy,

That's nice and simple actually...

Virtualmin doesn't view example.com and cdn.example.com as at all related -- those are completely different.

So, what you'd do is simply create two separate Virtual Servers (or one Virtual Server, and one Sub-Server) using the "Create Virtual Server" link on the top-left of Virtualmin.

Then, once you create a Virtual Server, or Sub-Server, for cdn.example.com, you can put whatever content you'd like in there for that domain.

Will that do what you're after?

-Eric

Fri, 04/09/2010 - 11:02
mimetic2

Hi Eric,

Thanks for your quick reply. Ok so I'm not sure thats what i want.

So basically i want CDN.mydomain.com to redirect to a completely different site. SO what i did was,

1) new virtual server 2) added cdn.mydomain.com 3) i clicked "ip addresses and forwarding" and have -network interface: shared -ipv6: none -External IP Address (should I put this as the new ip address to transfer to?) Can i put in a URL? As that is the instructrions i received.

Also under enabled features should i disable most of those?

Maybe i'm close, not sure :). Thanks for the time to help :) love that this site is using drupal.

Sat, 04/10/2010 - 22:41
andreychek

Howdy,

So, you're saying that if someone browses to cdn.mydomain.com, you'd like them to be redirected to an unrelated domain?

You don't need to setup new network interfaces for that... you can just create a Virtual Server, and within that, setup a redirect in one of several ways:

  1. You can make an index.html or index.php file, and use it to do a redirect

  2. You can create a .htaccess file, and use mod_rewrite or similar to setup a redirect

  3. In the Virtual Server you setup, you can go into Server Configuration -> Website Redirects, click "Add a new website redirect.", choose a "Source Path" of "/", then enter the URL to the other system you wish to redirect to.

    -Eric

Sun, 10/10/2010 - 15:51 (Reply to #4)
Francewhoa
Francewhoa's picture

Thanks Eric. Confirming that #1, 2, 3 works :)

In my case for #3 I had to create a 'Sub-server'. Creating a 'Alias of [domain.com]' doesn't work with a Drupal site. It creates an infinite loop.

Find attached screenshot for correct 'Website Redirect' settings using a 'Sub-server'

- - -
Senior Product Manager, and Co-Founder at Ubertus.org Inc.
Love back your Virtualmin & Webmin community

Topic locked