Marc Schneiders <[EMAIL PROTECTED]> said:
> Thanks. But this is Apache what you are talking about, right? Sorry, I
> should have mentioned I use Thttpd. Not very familiar with Apache. All I
> have to do, is add a directory in the htdocs directory: DOMAIN.COM. ln -s
> this to www.DOMAIN.COM and change title, keywords, and where to redirect
> to in the index.html template. This could all be scripted easily, if it
> needs to be done very frequently. But then maybe this is exactly what your
> script does? Anyway, not much extra resources used in my set up. Just a
> subdirectory and a little file.
>
It's not just resources, it also helps to avoid clutter. If you do that for
several hundred or thousand domains, your htdocs directory becomes messy and
hard to navigate. If you do it for even more, your filesystem access times
will suffer too. I don't know if thhtpd allows you to do it any different
way, but if you're talking about thousands of domains, and you can, you
should.
As an example, on my system (using Apache), I set up one VirtualHost on one
IP address, and point all "parked" domains to that IP. Apache will then
default to the first VirtualHost, and in the DocumentRoot of that VirtualHost
I need just one script. That (PHP) script simple checks the HTTP_HOST (the
requested domain) against a MySQL database, and delivers the correct action
based on the result.
So if the user chose "redirect" in the "action" field, the user will be
redirected to the url in the "url" field. If they choose "frame", we do the
same with frames. They can also upload their own images and content, or use a
default parked screen. All from one VirtualHost, with no clutter.
So while the thttpd automated system is quite clever - and it is, I like it,
and it saves a lot of hassle - there are problems with it when you're talking
about large-scale virtual hosting. Unless there's a way around it that
is... :)
adam