Re: Apache 1.3 mass virtual hosting recipe
On September 22, 2004 10:10 am, Raúl Alexis Betancort Santana wrote:
> I wonder how running a script inside a mod_rewrite rule is better that
> defining a new NameVirtualHost directive, moreover taking into account that
It's better (IMO) because I do not have to configure apache. My admin
interface is greatly simplified because apache configuration does not need to
be done. I create a user who has a homedir in the appropriate location (or at
least who has access to the appropriate created location) and setup is
complete.
> that rewriting rule will run the script EVERY TIME a request reach the
> server, I hope you don't have high volume traffict to that server or you
> will go into troubles.
The script runs continually, it is not started for every incoming request.
Apache has a filehandle for the script's stdin and stdout, the overhead of
running the script will be very minimal and the script will not introduce
much delay. Checking for a few directories is no different than many apache
servers that check for .htaccess files all the way up to the root of the
filesystem, it does so very quickly.
When server traffic gets too high I will simply add servers but I see no
reason why this setup can't host hundreds of typical low-volume sites, I may
be proved wrong of course ;-)
I would not use this for a very high traffic site, I wouldn't host a very high
traffic site on a shared server period.
> I better follow this way ...
>
> httpd.conf (apache 1.3.X, apache 2.X doit automaticatly)
> ...
> Include /etc/apache/domains.d
> ...
>
> then simple create the <domain>.conf file from a template for example, and
> drop it inside /etc/apached/domains.d a simple /etc/init.d/apache reload
> and thats all, no need to check on every request to were should I get the
> files.
On previous servers I have used the template approach. I don't like to
creating hundreds of nearly identical configs, to me identical means
redundant.
--
Fraser Campbell <fraser@wehave.net> http://www.wehave.net/
Georgetown, Ontario, Canada Debian GNU/Linux
Reply to: