[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] DNS & Wildcard



jeanjean wrote:

> Hy,
>
> Is it really possible to wildcard a Hostname ?
> If yes, how to proceed ?
> Thanks a lot
> Jean

This works nicely on a raq3, should be similar on others:

(PS, DONT DONT DONT DONT edit the actual "pri" file itself (only the "pri. ..... .include" files are yours to touch/create) , as the GUI will be naughty and overwrite it for you <g>)

      pico -w /etc/named/pri.somedomain.com.include

then add this *. to the beginning of the domain name (wildcard dns entry) (ps use you own IP address :) )
      *.somedomain.com.    in      a       111.111.111.111

save it and then goto the GUI, and edit the DNS records for THIS domain, and add an "A" record as normal, giving a dummy host name  (ie aaa), save the settings, then go back in and remove the A record (aaa), and save once again.


Now.....
Then edit your httpd.conf file: (if you dont want apache changing whatever you typed into www.somedomain.com, you can leave the rewriting bit (ONLY) out, if doesn't bother you)
      pico -w /etc/httpd/conf/httpd.conf

and scroll down to the virtualhost tag for the domain, and change:
      RewriteEngine on
to
      RewriteEngine off

But YOU MUST and add this line:  (well only if you want it to work)
      ServerAlias *.somedomain.com

then restart apache,
      /etc/rc.d/init.d/httpd restart

then you can type anything you want in as the host/subdomain for the domain in question (65 chars I think is the max tho)

--
Regards,
Kul
Kul's Free Scripts/Recipies: http://freebies.omega-isp.com/