View Single Post
  #9  
Old 16th May 2007, 13:23
LeoXavior LeoXavior is offline
Junior Member
 
Join Date: May 2007
Posts: 8
Thanks: 1
Thanked 0 Times in 0 Posts
Thumbs up

Hey Radim, thx for this idea.. I am very interested in getting this setup on my system...
I'm trying to follow you're directions but im unclear on the dns/cname directions..

This is what I have done so far:
1) Set users to be created thru [DOMAIN]_
2) Created file: /etc/apache2/user_rewrite.conf
3) Inserted into user_rewrite.conf:
Code:
RewriteEngine On
RewriteCond %{SERVER_NAME} !^www\.
RewriteCond %{SERVER_NAME} !^mail\.
RewriteCond %{SERVER_NAME} ^([^.]*)\.(.*\..*)$
RewriteRule ^/(.*)$ http://www.%2/users/%2_%1/$1 [P]
4) Added Include user_rewrite.conf into my sites default apache directives
5) Restarted apache2
6) Created user: serverhash.com_testuser
7) Added CNAME:
Code:
Hostname Target
testuser testuser.serverhash.com
Complete DNS setup is as follows:
Code:
 
  A Record 
  IP-Adresse  	  Hostname 
  72.148.231.196  	  www 
 
  CNAME 
  Hostname  	  Target 
  testuser  	  testuser.serverhash.com 
 
  MX 
  Mailserver  	  Hostname 
  www.serverhash.com  	   
  mail.serverhash.com  	  mail
Works:
http://www.serverhash.com/users/serv....com_testuser/
http://www.serverhash.com/~serverhash.com_testuser/

Does not work:
http://testuser.serverhash.com/

Can you see anything im doing wrong. any help is appreciated.
Reply With Quote