How to make automatic subdomaine

naruto kun

Registered
Mar 15, 2008
1
0
51
Hello,
First, sorry for my english (I'm french :p)

I want to make a automatic redirection with a subdomaines...

http://???.myweb.com -> http://myweb.com/subdoms/???

I've try with the httpd.conf file but it doesnt work :(

I've write that in:

Code:
<VirtualHost MY-IP:80>
    ServerName *.myweb.com
    ServerAlias www.*.myweb.com
    DocumentRoot /home/myweb/public_html/subdoms/%1
    ServerAdmin [email protected]
	UseCanonicalName Off
    ## User myweb # Needed for Cpanel::ApacheConf
    <IfModule mod_suphp.c>
        suPHP_UserGroup myweb myweb
    </IfModule>
    <IfModule !mod_disable_suexec.c>
        SuexecUserGroup myweb myweb
    </IfModule>
    CustomLog /usr/local/apache/domlogs/%1.myweb.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
    CustomLog /usr/local/apache/domlogs/%1.myweb.com combined
</VirtualHost>
I've try to add manualy a dns in WHM:
* IN A MY-IP
www.* IN A MY-IP
But the server dont work whith that (187 messages of error this Night)

What I does to do for make correcly that?

Thanks for all the answer...