RE: [users@httpd] Creating a Catch-Everything Catch-All

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

 



I believe this might work for you but I have never tried it.  The rest
of this is DNS...

<VirtualHost _default_>
ServerAdmin webmaster@xxxxxxxxxxxx
ServerAlias *.mydomain.com
DocumentRoot /home/mydomain/public_html
Alias /error /var/html/public_error
ErrorDocument 404 /error/mycustom404.html
</VirtualHost>


<VirtualHost xx.36.161.82>
ServerAdmin jacko@xxxxxxxxxxxx
ServerAlias jacko.mydomain.com
DocumentRoot /home/jack.mydomain/public_html
Alias /error /var/html/public_error
ErrorDocument 404 /error/mycustom404.html
</VirtualHost>

<VirtualHost xx.36.161.82>
ServerAdmin webmaster@xxxxxxxxxxxx
ServerAlias corp.mydomain.com
DocumentRoot /home/corp.mydomain/public_html
Alias /error /var/html/public_error
ErrorDocument 404 /error/mycustom404.html
</VirtualHost>

> -----Original Message-----
> From: apache.org@xxxxxxxxxxxx [mailto:apache.org@xxxxxxxxxxxx]
> Sent: Monday, October 17, 2005 3:27 PM
> To: apache
> Subject: RE: [users@httpd] Creating a Catch-Everything Catch-All
> 
> 
> 
> Gary, thank you so much for taking the time to answer.
> 
> If possible, could you clarify how I should format the _default_
> virtualhost entry?
> 
> A typical virtualhost entry in my conf looks like this:
> 
> -----------
> <VirtualHost xx.36.161.82>
> ServerAlias mydomain.com
> ServerAdmin webmaster@xxxxxxxxxxxx
> DocumentRoot /home/mydomain/public_html
> BytesLog domlogs/mydomain.com-bytes_log
> ServerName www.mydomain.com
> 
> User mydomain
> Group mydomain
> CustomLog /usr/local/apache/domlogs/mydomain.com combined
> ScriptAlias /cgi-bin/ /home/mydomain/public_html/cgi-bin/
> </VirtualHost>
> -----------
> 
> What parts of that should I alter to create a _default_ virtualhost?
> 
> Should I simply replace the "mydomain.com" with "ServerAlias *.*", and
> "Servername www.mydomain.com" with "*.*.*"?
> 
> Sorry, again, for my lack of clue on this, I really am finding this
> bewildering.
> 
> Thanks,
> 
> Donnacha
> 
> 
> On Mon, 17 Oct 2005 13:55:10 -0700, "Gary W. Smith"
> <gary@xxxxxxxxxxxxxxx> said:
> > This requires two things.  One, you need to configure DNS to
catchall.
> > I'm not sure how to do this but search google for bind and all.
> >
> > As for the other one, create a vitual site as _default_ and give
server
> > aliases.  Then if you create a real virtual site you will need to
use
> > the qualified domain name for it (say ServerAlias jack.thissite.com)
in
> > the configuration.
> >
> > ServerAlias thissite.com
> > ServerAlias *.thissite.com
> >
> > Then I would just create a 404 rule that points to a single pave and
> > remove all of the other content.
> >
> > I think that's the easiest way.
> >
> > > -----Original Message-----
> > > From: apache.org@xxxxxxxxxxxx [mailto:apache.org@xxxxxxxxxxxx]
> > > Sent: Monday, October 17, 2005 1:25 PM
> > > To: users@xxxxxxxxxxxxxxxx
> > > Subject: [users@httpd] Creating a Catch-Everything Catch-All
> > >
> > > 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
> > > someone here can help me.
> > >
> > > 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.
> > >
> > > Of course, if someone browses to a domain I have defined I don't
want
> > > them to see the catch-all.
> > >
> > > From my research so far, I suspect there is some way to achieve
this
> > > using default virtualhosts and I have tried entering various
entries
> > > into httpd.conf but, unfortunately, most of the instructions I'm
> > working
> > > from presume more basic knowledge than I have and leave out
certain
> > > parts of the entry that are probably obvious to everyone but me.
> > >
> > > I would greatly appreciate it if someone could show me exactly
what a
> > > comprehensive default virtualhost entry that catches all
variations
> > and
> > > subdomains etc should look like, and tell me if there are any
other
> > > settings I should also be changing.
> > >
> > > Again, sorry if this is all very obvious stuff, I honestly haven't
> > been
> > > able to get my head around it.
> > >
> > > Thanks,
> > >
> > > Donnacha
> > >
> > >
---------------------------------------------------------------------
> > > The official User-To-User support forum of the Apache HTTP Server
> > Project.
> > > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > > To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> > >    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> > > For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> >
> >
> >
---------------------------------------------------------------------
> > The official User-To-User support forum of the Apache HTTP Server
> > Project.
> > See <URL:http://httpd.apache.org/userslist.html> for more info.
> > To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
> >    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> > For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
> >
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server
Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux