My apologies if I've posted this question in the wrong forum.
I am trying to figure out how to map
/home/u/~user/public_html
such that each user will have his/her/its own subdomain eg
user.mydomain.com redirects to /home/u/~user/public_html/
I have DNS set as such
*.mydomain.com directs to the main http server box mydomain.com
mydomain.com works great (I heart Apache)
I have configured several virtualhosts that are currently working, ie. I have successfully created
user1.mydomain.com and user2.mydomain.com by hand. They work fine.
Is there a way to avoid having to do this by hand?
eg.
Code:
<VirtualHost *:80>
ServerName mydomain.com
ServerAlias *.mydomain.com
DocumentRoot /home/*/~*/public_html
<Directory /home/*/~*/public_html>
Options FollowSymLinks
AllowOverride None
</Directory>
</VirtualHost>
Of course, when I try something similar to the above and restart Apache I get the error
"Directory /home/*/~*/public_html Does not exist" or something to that effect.
Thank you very much, indeed.