Forum Moderators: phranque

Message Too Old, No Replies

Domain Mapping – Apache VirtualHost

         

fil33

3:14 pm on Feb 27, 2012 (gmt 0)

10+ Year Member



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:

Code:
<VirtualHost xx.xx.xx.xx:80>
DocumentRoot /xx/xx/xx
ServerName domaine.com
ServerAlias *.domaine.com
CustomLog /xx/xx/xx.log
ErrorLog /xx/xx/xx.log
php_admin_value xx
php_admin_flag xx
[...]
</VirtualHost>


I did a test with a domain name to me (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).


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

phranque

4:18 am on Mar 1, 2012 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



welcome to WebmasterWorld, fil33!

is the DocumentRoot value correct for the main domain content?
what are you using for DirectoryIndex and is it serving that content in response to your request?