Domain Mapping – Apache VirtualHost

Discussion in 'Apache' started by fil33, Feb 21, 2012.

  1. #1
    Hello,

    I am running a blog platform. My users have their own subdomains (pseudo.domain.com). I'd like to give them the opportunity to use their own domain (as proposed by blogger or wordpress.com) via a CNAME record (www CNAME domaine.com)

    My current VirtualHost looks like this:
    <VirtualHost xx.xx.xx.xx:80>
    DocumentRoot /xx/xx/xx
    ServerName domaine.com
    ServerAlias *.domaine.com
    CustomLog /xxxxxxx/xxx/log
    ErrorLog /xxxxxxx/xxx/log
    php_admin_value 
    [...]
    </VirtualHost>
    Code (markup):
    How can I change this VirtualHost to accept all the CNAME users?

    Or do I create a new VirtualHost, but how do I go about it? And if I have to create a new one, it must be placed before or after it?

    Thank you!

    Excuse me for my English very approximate :)
     
    Last edited: Feb 21, 2012
    fil33, Feb 21, 2012 IP
  2. GoldSEO

    GoldSEO Member

    Messages:
    280
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    33
    #2
    Are you sure you need to do mapping?

    Couldn't they just transfer dns to your host, you install wordpress, addon their domain, and redirect it to their URL?

    The idea is to have their domain name pointed at your host, right?
     
    GoldSEO, Feb 21, 2012 IP
  3. fil33

    fil33 Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you !

    I think this is essential.

    I did a test with a domain name to me. On the domain I set up a CNAME to the main domain name (domain.com).

    The problem is that when I go to this new address, the content displayed is not the main domain but it is the home page of the server (Welcome to your new server! [...] Debian Linux [. ..] Power by apache .... like when I go directly to the server IP address or I specify the server name in my browser).

    I would like these domain names (CNAME) is taken to my virtualhost and point to the path indicated by the virtualhost (with the same path and same php_admin_value log).

    I do not know how.
     
    fil33, Feb 22, 2012 IP
  4. rbravoz

    rbravoz Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    i am also having exactly the same problem as fil33, so any help to him will also help me!
     
    rbravoz, Feb 25, 2012 IP
  5. md7waseem

    md7waseem Peon

    Messages:
    86
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    md7waseem, Mar 14, 2012 IP