Need help for subdomain

Gerald Waugh gerald at waugh.com
Wed Nov 22 07:23:15 UTC 2000



"Eric PETIT" <epetit at cybercom-solutions.com> wrote in message
news:974839306.143152 at romulus.infonie.fr...
> Hi every one,
>
> I would like to offer a domain name to my users (like
> http://user_name.my_domain.com). Actually, to do this, i create a new file
> into my /var/named directory (same name like the domain name) and i add a
> new zone entry into my /etc/named.conf file.
>
> So, my question is very simple: is it possible to manage each domain into
> the same /var/named/.. file and without creating a new zone too ? (like
> adding a new specific entry into the /var/named/my_domain.com)
>
> Very thanks for your help :))
> best regards
> Eric

Corrections and mor info

> I don't know if it is correct, but I just add more 'A' records in "mydomain"
> zone file.
> For instance:
> www.user.thedomain.com  IN  A  xxx.xxx.xxx.xxx
> user.thedomain.com         IN  A  xxx.xxx.xxx.xxx
> Then reload the zone
> Then insert a virtual site (user.thedomain) in httpd.conf.
> Restart httpd
> And it works!
> Gerald
>
httpd/conf entry:
<VirtualHost xxx.xxx.xxx.xxx>
ServerName www.user.thedomain.com
ServerAdmin theadmin
ServerAlias user.thedomain.com
DocumentRoot /the-path-to-the-users-web-directory
RewriteEngine on
RewriteCond %{HTTP_HOST}             !^xxx.xxx.xxx.xxx(:80)?$
RewriteCond %{HTTP_HOST}             !^www.user.thedomain.com(:80)?$
RewriteRule ^/(.*)                   http://www.user.thedomain.com/$1 [L,R]
RewriteOptions inherit
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
</VirtualHost>





More information about the bind-users mailing list