Re: Apache and Virtual Hosting
On Mon, May 14, 2001 at 11:02:27PM -0400, Jason Healy wrote:
> At 989895234s since epoch (05/14/01 22:53:54 -0400 UTC), Scott Raun wrote:
> > I'm Apache 1.3 on potato.
> >
> > I can't get name-based virtual hosting to work.
>
> I too, suffered from this. I'm not sure if you're having the same problem
> that I was, but it turned out that potato uses Apache 1.3.9, and the "new"
> virtualhosting syntax came about in 1.3.14 or so. So it could very well be
> that the slightly outdated version of apache that ships with potato doesn't
> understand your virtualhost rules.
>
> I hit my head against the wall for *days* before finding out that little
> tidbit, so make sure that your virtualhost rules are compliant with apache
> 1.3.9 before you try much else.
i'm using potato-friendly apache-perl which is version 1.3.9:
% apache -v
Server version: Apache/1.3.9 (Unix) Debian/GNU
Server built: Apr 30 2000 12:54:24
% dpkg -l apache\*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
rc apache 1.3.9-13.1 Versatile, high-performance HTTP server
ii apache-common 1.3.9-13.2 Support files for all Apache webservers
ii apache-dev 1.3.9-13.2 Apache webserver development kit
pn apache-doc <none> (no description available)
un apache-modules <none> (no description available)
ii apache-perl 1.3.9-13.1-1.2 Versatile, high-performance HTTP server with
and i've got a handful of virtual hosts, working just like
downtown--within the macro construct, no less:
NameVirtualHost ##.##.##.##
<Macro Virtual $h $p>
# same ip number as in "NameVirtualHost":
<VirtualHost ##.##.##.##>
ServerAdmin webmaster@$h
DocumentRoot $p
# HTTP/1.1 header "Host:" must match "$h" or "www.$h"
ServerName www.$h
ServerAlias $h
UserDir disabled
DirectoryIndex index.html index.cgi
<Directory $p>
AllowOverride none
Options Indexes Includes
order allow,deny
allow from all
</Directory>
IndexIgnore .??* *~ *# HEADER* README* RCS
<Files ~ "(README|HEADER)$">
ForceType text/plain
</Files>
#refers to an errordocument macro:
Use SnagErrors
</VirtualHost>
</Macro>
(i think i had to do something to 'wake up' the macro facility,
but dang if i can recall what...)
said macros are called thusly, further down in httpd.conf:
Use Virtual "easydxftype.serensoft.com" "/var/www/bryce"
Use Virtual "dontUthink.com" "/var/www/puz"
Use Virtual "flint.dontUthink.com" "/var/www/flint"
(and you'd need a DNS server to back up your naming instances, of
course...)
--
DEBIAN NEWBIE TIP #15 from Will Trillich <will@serensoft.com>
:
Is there a good place to learn snarky PERL TECHNIQUES? One of
my favorites is http://webtechniques.com, where Randall Schwartz
contributes a monthly sample, explaining line-by-line what his
code does, and why. (Look under "Programming with Perl" in the
archives.)
Also see http://newbieDoc.sourceForge.net/ ...
Reply to: