LittleHavoc
IS-IT--Management
Hello
I have space on a friends dedicated server and he is not available all the time to carry out work for me. Therefore I want to configure a virtual host in apache to cope with all my subdomains in one configuration. I am basically after some wildcard or re-write information.
e.g.
normally I would do the following, adding each subdomain as another virtual host.
<VirtualHost *>
ServerName domain.com
DocumentRoot /</VirtualHost>
<VirtualHost *>
ServerName subdomain.domain.com
DocumentRoot /</VirtualHost>
BUT what I would like is something like:-
<VirtualHost *.domain.com:80>
ServerName %S.domain.com
DocumentRoot /</VirtualHost>
If I want a new subdomain (eg sub) I would point it to the server and make sure I create the directory, and thats it, no editing of the httpd.conf would be needed.
I have space on a friends dedicated server and he is not available all the time to carry out work for me. Therefore I want to configure a virtual host in apache to cope with all my subdomains in one configuration. I am basically after some wildcard or re-write information.
e.g.
normally I would do the following, adding each subdomain as another virtual host.
<VirtualHost *>
ServerName domain.com
DocumentRoot /</VirtualHost>
<VirtualHost *>
ServerName subdomain.domain.com
DocumentRoot /</VirtualHost>
BUT what I would like is something like:-
<VirtualHost *.domain.com:80>
ServerName %S.domain.com
DocumentRoot /</VirtualHost>
If I want a new subdomain (eg sub) I would point it to the server and make sure I create the directory, and thats it, no editing of the httpd.conf would be needed.