Creating a Catch-Everything Catch-All

/dev/rob0 rob0 at gmx.co.uk
Mon Oct 24 19:28:43 UTC 2005


On Monday 2005-October-17 23:53, ics.org at donnacha.com wrote:
> Please forgive my lack of clue.  I have read the FAQ and googled
> ferociously but haven't been able to find a solution, I hope that

Your ferocity probably frightened the Google elves. ;)

> I would like anybody to be able to point their domains at my
> nameservers and for anybody browsing to "thatdomain.com" or
> "www.thatdomain.com" or "*.thatdomain.com" or "thatdomain.com/*" to
> see a default/catch-all PHP page.
>
> I am managed to create httpd.conf entries that show my PHP page when
> I enter one of my IP addresses into a browser but, so far, I can't
> get the same page to appear when I enter undefined domains into my

This is an httpd (Apache?) configuration issue. "VirtualHost", 
"NameVirtualHost" and other directives. Don't Google -- let the poor 
elves regain their wits -- you have all the documentation with your 
Apache install.

> I would greatly appreciate it if someone could show me how to create
> a catchall file in bind that would catch all variations and

You want a wildcard "A" or "CNAME".

; assuming $ORIGIN and $TTL properly defined
*		A	your.ip.add.ress
; or CNAME:
*		CNAME	your.resolvable.hostname.example.com.
; leave off ".example.com." if it's under your $ORIGIN

> subdomains of undefined domains and point them to my PHP page.

DNS points the browser to an IP address ... that is all. Your HTTP 
daemon has to do the rest of it.
-- 
    mail to this address is discarded unless "/dev/rob0"
    or "not-spam" is in Subject: header



More information about the bind-users mailing list