TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:5849] virtual web hosts and public_html



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Sometime around the 5th of May in 1999, a certain Tim Wilson said:

: We're going to create a different virtual host for each school so that
: visitors can point their browsers to sibley.isd197.k12.mn.us or
: mendota.isd197.k12.mn.us (for Mendota Elem. School). We will select a
: person who will be the official web master for each building and will give
: them an account on the web server. Additionally, we'd like to give
: individual teachers space for classroom web pages on their school's
: "virtual" web server.

I've got this sort of scenario working (I haven't tested it
with user pages ; I could give it a shot, if you'd like) with
my machine having two CNAMEs defined as Apache vhosts.

The setup works like this:

- - My machine serves up default web pages on www.jellyd.org.
  This is a CNAME for itsmy.jellyd.org, the machine itself.

- - I have another CNAME, spectrum.jellyd.org (pointing back to
  itsmy.jellyd.org), setup to serve web pages for a particular
  user.

Here's the relevant portions of my httpd.conf (Apache 1.3.4):

ServerAdmin webmaster@jellyd.org
ServerName www.jellyd.org
DocumentRoot "/usr/local/apache/htdocs"

# This is the machine's IP addr .. I _think_ it needs
# to be set correctly in IP format for this to work.
# I remember having lots of problems making it work at
# all .. and it's set like this now, so it shouldn't
# hurt much to make it so ;)

NameVirtualHost 141.219.82.174:80

<VirtualHost www.jellyd.org>
    ServerAdmin webmaster@jellyd.org
    DocumentRoot /usr/local/apache/htdocs
    ServerName www.jellyd.org
    ErrorLog logs/www.jellyd.org-error_log
    CustomLog logs/www.jellyd.org-access_log
</VirtualHost>

<VirtualHost spectrum.jellyd.org>
    ServerAdmin mud@jellyd.org
    DocumentRoot /home/mud/public_html
    ServerName spectrum.jellyd.org
    ErrorLog logs/spectrum.jellyd.org-error_log
    CustomLog logs/spectrum.jellyd.org-access_log
</VirtualHost>

I've got another vhost (_default_:443, for SSL), but it doesn't
have any bearing on the rest of the matter.

HTH.

- --
[----------------------------------------------------------------------]
| Joshua Becker                    - aka -                      JellyD |
| email: jellyd@jellyd.org                          IRC: EFnet, DALnet |
[----------------------------------------------------------------------]

-----BEGIN PGP SIGNATURE-----
Version: GNUPG v0.4.3 (GNU/Linux)
Comment: For info finger gcrypt@ftp.guug.de

iD8DBQE3MROhcmkpI69BOLwRAg5dAJ9zVLFFw4QqMhE+73j84NSVswcA+QCffIsV
BdrhqiWsN/pI3U/teq3JMXs=
=EOsD
-----END PGP SIGNATURE-----