httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgau...@hyperreal.org
Subject cvs commit: apachen/src/test/vhtest/docroot/vhost5 vhost.txt
Date Mon, 10 Nov 1997 02:11:56 GMT
dgaudet     97/11/09 18:11:56

  Added:       src/test/vhtest README runtest
               src/test/vhtest/bin test1 test1d test2 test2d test3 test4
                        test5 test6 vhget
               src/test/vhtest/conf common.conf mime.types test1.conf
                        test1d.conf test2.conf test2d.conf test3.conf
                        test4.conf test5.conf test6.conf
               src/test/vhtest/docroot/default1 vhost.txt
               src/test/vhtest/docroot/default2 vhost.txt
               src/test/vhtest/docroot/default3 vhost.txt
               src/test/vhtest/docroot/main vhost.txt
               src/test/vhtest/docroot/vhost1 vhost.txt
               src/test/vhtest/docroot/vhost2 vhost.txt
               src/test/vhtest/docroot/vhost3 vhost.txt
               src/test/vhtest/docroot/vhost4 vhost.txt
               src/test/vhtest/docroot/vhost5 vhost.txt
  Log:
  add the vhost test suite
  
  Revision  Changes    Path
  1.1                  apachen/src/test/vhtest/README
  
  Index: README
  ===================================================================
  This is a basic test of the virtual host functionality.
  
  At present it *does not test*:
  
  - ServerPath
  - <VirtualHost> DNS lookups (specifically, multiple A records is interesting)
  
  It does test the basic gear that uses ip addresses and ports to decide what
  ip-vhost or set of name-vhosts are to be considered.  It tests _default_
  behaviour with both explicit and wildcard ports.  It tests the precedence
  behaviour -- i.e. earlier vhosts have higher precedence than later vhosts.
  It has a basic ServerAlias test.
  
  It also tests some error conditions.
  
  These tests are "white box" tests, i.e. I know how the code is written and
  I'm testing very specific cases within the code.  Black box tests would
  be nice too.
  
  To use:
  
      cd conf
      perl -pi.orig -e "s#/home/dgaudet/ap/vhtest#`pwd`#" *.conf
      cd ..
      ./runtest /path/to/httpd
  
  Or to run a specific test:
  
      ./runtest /path/to/httpd test3
  
  The output looks something like:
  
  127.0.0.1:8080       ''                   'vhost1'       : passed
  127.0.0.1:8080       'vhost1:8080'        'vhost1'       : passed
  127.0.0.1:8080       'vhost2:8080'        'vhost1'       : passed
  127.0.0.1:8081       ''                   'vhost2'       : passed
  127.0.0.1:8081       'vhost2:8081'        'vhost2'       : passed
  127.0.0.1:8081       'vhost1:8081'        'vhost2'       : passed
  127.0.0.2:8080       ''                   'vhost3'       : passed
  
  The first column is the ipaddr:port connected to.  The second column is
  the Host: header sent ('' means no Host: header sent).  The third column
  is the vhost expected.
  
  It probably only works on Linux because it uses the loopback interface for
  all tests -- and Linux lo0 responds to *all* addresses in 127/8 rather than
  just 127.0.0.1.  You'd probably have to add the following aliases to other
  boxes:
  
      127.0.0.2
      127.0.0.3
      127.0.0.4
      127.0.0.5
  
  Dean
  
  
  
  1.1                  apachen/src/test/vhtest/runtest
  
  Index: runtest
  ===================================================================
  #!/bin/sh
  
  if [ $# -lt 1 ]; then
      echo "usage: runtest /path/to/httpd" 1>&2
      exit 1
  fi;
  
  httpd="$1"
  shift
  pwd="`pwd`"
  
  
  if [ $# = 0 ]; then
      list=conf/test*.conf
  else
      list=$*
  fi
  
  pid=0
  exitcode=0
  trap 'kill $pid >/dev/null 2>&1; exit $exitcode' 0 1 2 3 15
  
  for i in $list; do
      j=`echo $i | sed -e 's#.*/##' -e 's#\.conf$##'`
      echo ''
      echo "==== $j ===="
      f="$pwd/conf/$j.conf"
      grep '^##' $f
      $httpd -f $f
      # such a pain to wait for the pid file to be created
      sleep 1
      pid="`cat logs/httpd.pid`"
  
      sh bin/$j
  
      # such a pain to know if it has finished
      kill $pid
      sleep 1
      while kill -0 $pid >/dev/null 2>&1; do
  	sleep 1
      done
  done
  
  
  
  1.1                  apachen/src/test/vhtest/bin/test1
  
  Index: test1
  ===================================================================
  bin/vhget 127.0.0.1 8080 '' vhost1
  bin/vhget 127.0.0.1 8080 vhost1:8080 vhost1
  bin/vhget 127.0.0.1 8080 vhost2:8080 vhost1
  
  bin/vhget 127.0.0.2 8080 '' vhost2
  bin/vhget 127.0.0.2 8080 vhost2:8080 vhost2
  bin/vhget 127.0.0.2 8080 vhost1:8080 vhost2
  
  bin/vhget 127.0.0.3 8080 '' vhost3
  bin/vhget 127.0.0.3 8080 vhost3:8080 vhost3
  bin/vhget 127.0.0.3 8080 vhost4:8080 vhost4
  
  bin/vhget 127.0.0.4 8080 '' main
  bin/vhget 127.0.0.4 8080 'vhost1' main
  bin/vhget 127.0.0.4 8080 'vhost2' main
  
  
  
  1.1                  apachen/src/test/vhtest/bin/test1d
  
  Index: test1d
  ===================================================================
  bin/vhget 127.0.0.1 8080 '' vhost1
  bin/vhget 127.0.0.1 8080 vhost1:8080 vhost1
  bin/vhget 127.0.0.1 8080 vhost2:8080 vhost1
  
  bin/vhget 127.0.0.2 8080 '' vhost2
  bin/vhget 127.0.0.2 8080 vhost2:8080 vhost2
  bin/vhget 127.0.0.2 8080 vhost1:8080 vhost2
  
  bin/vhget 127.0.0.3 8080 '' vhost3
  bin/vhget 127.0.0.3 8080 vhost3:8080 vhost3
  bin/vhget 127.0.0.3 8080 vhost4:8080 vhost4
  
  bin/vhget 127.0.0.4 8080 '' default1
  bin/vhget 127.0.0.4 8080 'vhost1' default1
  bin/vhget 127.0.0.4 8080 'vhost2' default1
  
  
  
  1.1                  apachen/src/test/vhtest/bin/test2
  
  Index: test2
  ===================================================================
  bin/vhget 127.0.0.1 8080 '' vhost1
  bin/vhget 127.0.0.1 8080 vhost1:8080 vhost1
  bin/vhget 127.0.0.1 8080 vhost2:8080 vhost1
  
  bin/vhget 127.0.0.1 8081 '' vhost2
  bin/vhget 127.0.0.1 8081 vhost2:8081 vhost2
  bin/vhget 127.0.0.1 8081 vhost1:8081 vhost2
  
  bin/vhget 127.0.0.2 8080 '' vhost3
  bin/vhget 127.0.0.2 8080 vhost3:8080 vhost3
  bin/vhget 127.0.0.2 8080 vhost1:8080 vhost3
  bin/vhget 127.0.0.2 8081 '' vhost3
  bin/vhget 127.0.0.2 8081 vhost3:8081 vhost3
  bin/vhget 127.0.0.2 8081 vhost1:8081 vhost3
  
  bin/vhget 127.0.0.3 8080 '' vhost4
  bin/vhget 127.0.0.3 8080 'vhost4:8080' vhost4
  bin/vhget 127.0.0.3 8080 'vhost5:8080' vhost5
  
  bin/vhget 127.0.0.3 8081 '' vhost5
  bin/vhget 127.0.0.3 8081 'vhost4:8081' vhost5
  bin/vhget 127.0.0.3 8081 'vhost5:8081' vhost5
  bin/vhget 127.0.0.3 8081 'alt5:8081' vhost5
  
  bin/vhget 127.0.0.4 8080 '' main
  bin/vhget 127.0.0.4 8080 'vhost1:8080' main
  bin/vhget 127.0.0.4 8081 '' main
  bin/vhget 127.0.0.4 8081 'vhost1:8081' main
  
  
  
  1.1                  apachen/src/test/vhtest/bin/test2d
  
  Index: test2d
  ===================================================================
  bin/vhget 127.0.0.1 8080 '' vhost1
  bin/vhget 127.0.0.1 8080 vhost1:8080 vhost1
  bin/vhget 127.0.0.1 8080 vhost2:8080 vhost1
  
  bin/vhget 127.0.0.1 8081 '' vhost2
  bin/vhget 127.0.0.1 8081 vhost2:8081 vhost2
  bin/vhget 127.0.0.1 8081 vhost1:8081 vhost2
  
  bin/vhget 127.0.0.2 8080 '' vhost3
  bin/vhget 127.0.0.2 8080 vhost3:8080 vhost3
  bin/vhget 127.0.0.2 8080 vhost1:8080 vhost3
  bin/vhget 127.0.0.2 8081 '' vhost3
  bin/vhget 127.0.0.2 8081 vhost3:8081 vhost3
  bin/vhget 127.0.0.2 8081 vhost1:8081 vhost3
  
  bin/vhget 127.0.0.3 8080 '' vhost4
  bin/vhget 127.0.0.3 8080 'vhost4:8080' vhost4
  bin/vhget 127.0.0.3 8080 'vhost5:8080' vhost5
  
  bin/vhget 127.0.0.3 8081 '' vhost5
  bin/vhget 127.0.0.3 8081 'vhost4:8081' vhost5
  bin/vhget 127.0.0.3 8081 'vhost5:8081' vhost5
  bin/vhget 127.0.0.3 8081 'alt5:8081' vhost5
  
  bin/vhget 127.0.0.4 8080 '' default1
  bin/vhget 127.0.0.4 8080 'vhost1:8080' default1
  bin/vhget 127.0.0.4 8081 '' default2
  bin/vhget 127.0.0.4 8081 'vhost1:8081' default2
  
  
  
  1.1                  apachen/src/test/vhtest/bin/test3
  
  Index: test3
  ===================================================================
  bin/vhget 127.0.0.1 8080 '' vhost1
  bin/vhget 127.0.0.1 8080 vhost1:8080 vhost1
  bin/vhget 127.0.0.1 8080 vhost2:8080 vhost2
  bin/vhget 127.0.0.1 8080 vhost3:8080 vhost3
  bin/vhget 127.0.0.1 8080 vhost4:8080 vhost1
  bin/vhget 127.0.0.1 8080 vhost5:8080 vhost5
  
  bin/vhget 127.0.0.1 8081 '' vhost2
  bin/vhget 127.0.0.1 8081 vhost1:8081 vhost2
  bin/vhget 127.0.0.1 8081 vhost2:8081 vhost2
  bin/vhget 127.0.0.1 8081 vhost3:8081 vhost3
  bin/vhget 127.0.0.1 8081 vhost4:8081 vhost4
  bin/vhget 127.0.0.1 8081 vhost5:8081 vhost5
  
  
  
  1.1                  apachen/src/test/vhtest/bin/test4
  
  Index: test4
  ===================================================================
  bin/vhget 127.0.0.1 8080 '' vhost1
  bin/vhget 127.0.0.1 8080 vhost1:8080 vhost1
  bin/vhget 127.0.0.1 8080 vhost2:8080 vhost2
  bin/vhget 127.0.0.1 8080 vhost3:8080 vhost1
  
  bin/vhget 127.0.0.1 8081 '' vhost1
  bin/vhget 127.0.0.1 8081 vhost1:8081 vhost1
  bin/vhget 127.0.0.1 8081 vhost2:8081 vhost2
  bin/vhget 127.0.0.1 8081 vhost3:8081 vhost1
  
  
  
  1.1                  apachen/src/test/vhtest/bin/test5
  
  Index: test5
  ===================================================================
  bin/vhget 127.0.0.1 8080 '' vhost1
  bin/vhget 127.0.0.1 8080 vhost1:8080 vhost1
  bin/vhget 127.0.0.1 8080 vhost2:8080 vhost2
  bin/vhget 127.0.0.1 8080 vhost3:8080 vhost1
  
  bin/vhget 127.0.0.2 8080 '' vhost3
  bin/vhget 127.0.0.2 8080 'vhost3:8080' vhost3
  bin/vhget 127.0.0.2 8080 'vhost1:8080' vhost3
  
  bin/vhget 127.0.0.3 8080 '' default1
  bin/vhget 127.0.0.3 8080 'vhost1:8080' default1
  
  bin/vhget 127.0.0.1 8081 '' vhost4
  bin/vhget 127.0.0.1 8081 vhost1:8081 vhost4
  bin/vhget 127.0.0.1 8081 vhost2:8081 vhost4
  bin/vhget 127.0.0.1 8081 vhost3:8081 vhost4
  
  bin/vhget 127.0.0.2 8081 '' vhost5
  bin/vhget 127.0.0.2 8081 'vhost3:8081' vhost5
  bin/vhget 127.0.0.2 8081 'vhost1:8081' vhost5
  
  bin/vhget 127.0.0.3 8081 '' default2
  bin/vhget 127.0.0.3 8081 'vhost1:8081' default2
  
  
  
  1.1                  apachen/src/test/vhtest/bin/test6
  
  Index: test6
  ===================================================================
  
  
  
  1.1                  apachen/src/test/vhtest/bin/vhget
  
  Index: vhget
  ===================================================================
  #!/usr/bin/perl -w
  
  require 5.002;
  use strict;
  use Socket;
  
  # vhget ipaddr port hostheader expect
  
  $#ARGV == 3 || die "usage: $0 ipaddr port hostheader expect\n";
  
  my ($remote,$port, $iaddr, $paddr, $proto, $line);
  
  $remote = shift;
  $port = shift;
  my $hostheader = shift;
  my $expect = shift;
  
  printf "%-20s %-20s %-15s: ", "$remote:$port", "'$hostheader'", "'$expect'";
  
  if ($port =~ /\D/) {
      $port = getservbyname($port, 'tcp');
  }
  die "No port" unless $port;
  $iaddr   = inet_aton($remote) || die "no host: $remote";
  $paddr   = sockaddr_in($port, $iaddr);
  $proto   = getprotobyname('tcp');
  socket(SOCK, PF_INET, SOCK_STREAM, $proto)  || die "socket: $!";
  connect(SOCK, $paddr)    || die "connect: $!";
  
  my $oldfh = select(SOCK); $| = 1; select($oldfh);
  
  if ($hostheader ne '') {
      print SOCK <<EOR;
  GET /vhost.txt HTTP/1.0\r
  Host: $hostheader\r
  Connection: close\r
  \r
  EOR
  } else {
      print SOCK <<EOR;
  GET /vhost.txt HTTP/1.0\r
  Connection: close\r
  \r
  EOR
  }
  
  defined($line = <SOCK>) || die "error reading response: $!\n";
  
  ($line =~ m#^HTTP/1\.1 200#) || die "HTTP error: $line\n";
  
  while (defined($line = <SOCK>)) {
      last if $line =~ /^\r?$/;
  }
  
  defined($line = <SOCK>) || die "error reading response: $!\n";
  
  chomp($line);
  
  my $death = "$remote:$port with " .
  	( $hostheader eq '' ? "no Host:" : "Host: $hostheader" )
  	. " expected $expect, but got $line\n";
  if ($line eq $expect) {
      print "passed\n";
  } else {
      print "failed, got '$line'\n";
  }
  
  close (SOCK)            || die "close: $!";
  exit;
  
  
  
  1.1                  apachen/src/test/vhtest/conf/common.conf
  
  Index: common.conf
  ===================================================================
  ServerType standalone
  Port 8080
  HostnameLookups off
  User nobody
  Group #-1
  ServerRoot /home/dgaudet/ap/vhtest
  ErrorLog logs/error_log
  LogLevel debug
  # vhost "Host header" "request" response-code
  LogFormat "%v \"%{Host}i\" \"%r\" %>s"
  TransferLog logs/access_log
  PidFile logs/httpd.pid
  ResourceConfig /dev/null
  AccessConfig /dev/null
  ServerName main
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/main
  
  <Directory />
  AllowOverride none
  Options FollowSymLinks
  order allow,deny
  allow from all
  </Directory>
  
  
  
  
  1.1                  apachen/src/test/vhtest/conf/mime.types
  
  Index: mime.types
  ===================================================================
  # This file controls what MIME types are sent to the client for the
  # given file extensions.  Sending the correct MIME type to the client
  # is important so they know how to handle the content of the file.
  # Extra types can either be added here or by using an AddType directive
  # in your config files.
  
  # MIME type			Extension
  application/activemessage
  application/andrew-inset
  application/applefile
  application/atomicmail
  application/dca-rft
  application/dec-dx
  application/mac-binhex40	hqx
  application/mac-compactpro	cpt
  application/macwriteii
  application/msword		doc
  application/news-message-id
  application/news-transmission
  application/octet-stream	bin dms lha lzh exe class
  application/oda			oda
  application/pdf			pdf
  application/postscript		ai eps ps
  application/powerpoint		ppt
  application/remote-printing
  application/rtf			rtf
  application/slate
  application/wita
  application/wordperfect5.1
  application/x-bcpio		bcpio
  application/x-cdlink		vcd
  application/x-compress
  application/x-cpio		cpio
  application/x-csh		csh
  application/x-director		dcr dir dxr
  application/x-dvi		dvi
  application/x-gtar		gtar
  application/x-gzip
  application/x-hdf		hdf
  application/x-koan		skp skd skt skm
  application/x-latex		latex
  application/x-mif		mif
  application/x-netcdf		nc cdf
  application/x-sh		sh
  application/x-shar		shar
  application/x-stuffit		sit
  application/x-sv4cpio		sv4cpio
  application/x-sv4crc		sv4crc
  application/x-tar		tar
  application/x-tcl		tcl
  application/x-tex		tex
  application/x-texinfo		texinfo texi
  application/x-troff		t tr roff
  application/x-troff-man		man
  application/x-troff-me		me
  application/x-troff-ms		ms
  application/x-ustar		ustar
  application/x-wais-source	src
  application/zip			zip
  audio/basic			au snd
  audio/midi			mid midi kar
  audio/mpeg			mpga mp2
  audio/x-aiff			aif aiff aifc
  audio/x-pn-realaudio		ram
  audio/x-pn-realaudio-plugin	rpm
  audio/x-realaudio		ra
  audio/x-wav			wav
  chemical/x-pdb			pdb xyz
  image/gif			gif
  image/ief			ief
  image/jpeg			jpeg jpg jpe
  image/png			png
  image/tiff			tiff tif
  image/x-cmu-raster		ras
  image/x-portable-anymap		pnm
  image/x-portable-bitmap		pbm
  image/x-portable-graymap	pgm
  image/x-portable-pixmap		ppm
  image/x-rgb			rgb
  image/x-xbitmap			xbm
  image/x-xpixmap			xpm
  image/x-xwindowdump		xwd
  message/external-body
  message/news
  message/partial
  message/rfc822
  multipart/alternative
  multipart/appledouble
  multipart/digest
  multipart/mixed
  multipart/parallel
  text/html			html htm
  text/plain			txt
  text/richtext			rtx
  text/tab-separated-values	tsv
  text/x-setext			etx
  text/x-sgml			sgml sgm
  video/mpeg			mpeg mpg mpe
  video/quicktime			qt mov
  video/x-msvideo			avi
  video/x-sgi-movie		movie
  x-conference/x-cooltalk		ice
  x-world/x-vrml			wrl vrml
  
  
  
  1.1                  apachen/src/test/vhtest/conf/test1.conf
  
  Index: test1.conf
  ===================================================================
  ## test some basic ip-vhosts and a single name-vhost address
  
  Include /home/dgaudet/ap/vhtest/conf/common.conf
  
  #Listen 127.0.0.1:8080
  #Listen 127.0.0.2:8080
  
  NameVirtualHost 127.0.0.3:8080
  
  <VirtualHost 127.0.0.1:8080>
  ServerName vhost1
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost1
  </VirtualHost>
  
  <VirtualHost 127.0.0.2:8080>
  ServerName vhost2
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost2
  </VirtualHost>
  
  <VirtualHost 127.0.0.3:8080>
  ServerName vhost3
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost3
  </VirtualHost>
  
  <VirtualHost 127.0.0.3:8080>
  ServerName vhost4
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost4
  </VirtualHost>
  
  
  
  1.1                  apachen/src/test/vhtest/conf/test1d.conf
  
  Index: test1d.conf
  ===================================================================
  ## same as test1, but we throw in a _default_
  
  Include /home/dgaudet/ap/vhtest/conf/common.conf
  
  #Listen 127.0.0.1:8080
  #Listen 127.0.0.2:8080
  
  NameVirtualHost 127.0.0.3:8080
  
  <VirtualHost 127.0.0.1:8080>
  ServerName vhost1
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost1
  </VirtualHost>
  
  <VirtualHost 127.0.0.2:8080>
  ServerName vhost2
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost2
  </VirtualHost>
  
  <VirtualHost 127.0.0.3:8080>
  ServerName vhost3
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost3
  </VirtualHost>
  
  <VirtualHost 127.0.0.3:8080>
  ServerName vhost4
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost4
  </VirtualHost>
  
  <VirtualHost _default_:8080>
  ServerName default1
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/default1
  </VirtualHost>
  
  
  
  1.1                  apachen/src/test/vhtest/conf/test2.conf
  
  Index: test2.conf
  ===================================================================
  ## test more complex ip-vhosts with multiple ports, and name-vhosts on a
  ## single port of one ip
  
  Include /home/dgaudet/ap/vhtest/conf/common.conf
  
  Listen *:8080
  Listen *:8081
  
  NameVirtualHost 127.0.0.3:8080
  
  <VirtualHost 127.0.0.1:8080>
  ServerName vhost1
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost1
  </VirtualHost>
  
  <VirtualHost 127.0.0.1:8081>
  ServerName vhost2
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost2
  </VirtualHost>
  
  <VirtualHost 127.0.0.2:*>
  ServerName vhost3
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost3
  </VirtualHost>
  
  <VirtualHost 127.0.0.3:8080>
  ServerName vhost4
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost4
  </VirtualHost>
  
  <VirtualHost 127.0.0.3:8080 127.0.0.3:8081>
  ServerName vhost5
  ServerAlias alt5
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost5
  </VirtualHost>
  
  
  
  1.1                  apachen/src/test/vhtest/conf/test2d.conf
  
  Index: test2d.conf
  ===================================================================
  ## same as test2, but throw in a _default_ two port test
  
  Include /home/dgaudet/ap/vhtest/conf/common.conf
  
  Listen *:8080
  Listen *:8081
  
  NameVirtualHost 127.0.0.3:8080
  
  <VirtualHost 127.0.0.1:8080>
  ServerName vhost1
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost1
  </VirtualHost>
  
  <VirtualHost 127.0.0.1:8081>
  ServerName vhost2
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost2
  </VirtualHost>
  
  <VirtualHost 127.0.0.2:*>
  ServerName vhost3
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost3
  </VirtualHost>
  
  <VirtualHost 127.0.0.3:8080>
  ServerName vhost4
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost4
  </VirtualHost>
  
  <VirtualHost 127.0.0.3:8080 127.0.0.3:8081>
  ServerName vhost5
  ServerAlias alt5
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost5
  </VirtualHost>
  
  <VirtualHost _default_:8080>
  ServerName default1
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/default1
  </VirtualHost>
  
  <VirtualHost _default_:*>
  ServerName default2
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/default2
  </VirtualHost>
  
  
  
  
  1.1                  apachen/src/test/vhtest/conf/test3.conf
  
  Index: test3.conf
  ===================================================================
  ## multiple name-vhosts on multiple ports
  
  Include /home/dgaudet/ap/vhtest/conf/common.conf
  
  Listen *:8080
  Listen *:8081
  
  NameVirtualHost 127.0.0.1:8080
  NameVirtualHost 127.0.0.1:8081
  
  <VirtualHost 127.0.0.1:8080>
  ServerName vhost1
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost1
  </VirtualHost>
  
  <VirtualHost 127.0.0.1:8080 127.0.0.1:8081>
  ServerName vhost2
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost2
  </VirtualHost>
  
  <VirtualHost 127.0.0.1:8080 127.0.0.1:8081>
  ServerName vhost3
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost3
  </VirtualHost>
  
  <VirtualHost 127.0.0.1:8081>
  ServerName vhost4
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost4
  </VirtualHost>
  
  <VirtualHost 127.0.0.1:8080 127.0.0.1:8081>
  ServerName vhost5
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost5
  </VirtualHost>
  
  
  
  1.1                  apachen/src/test/vhtest/conf/test4.conf
  
  Index: test4.conf
  ===================================================================
  ## wildcard namevhost address
  
  Include /home/dgaudet/ap/vhtest/conf/common.conf
  
  Listen *:8080
  Listen *:8081
  
  NameVirtualHost 127.0.0.1:*
  
  <VirtualHost 127.0.0.1:*>
  ServerName vhost1
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost1
  </VirtualHost>
  
  <VirtualHost 127.0.0.1:*>
  ServerName vhost2
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost2
  </VirtualHost>
  
  
  
  1.1                  apachen/src/test/vhtest/conf/test5.conf
  
  Index: test5.conf
  ===================================================================
  ## no ports listed, they should all default to 8080, but we're also listening
  ## on 8081
  
  Include /home/dgaudet/ap/vhtest/conf/common.conf
  
  Listen 8080
  Listen 8081
  
  NameVirtualHost 127.0.0.1
  
  <VirtualHost 127.0.0.1>
  ServerName vhost1
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost1
  </VirtualHost>
  
  <VirtualHost 127.0.0.1>
  ServerName vhost2
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost2
  </VirtualHost>
  
  <VirtualHost 127.0.0.2>
  ServerName vhost3
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost3
  </VirtualHost>
  
  <VirtualHost _default_>
  ServerName default1
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/default1
  </VirtualHost>
  
  <VirtualHost 127.0.0.1:8081>
  ServerName vhost4
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost4
  </VirtualHost>
  
  <VirtualHost 127.0.0.2:8081>
  ServerName vhost5
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost5
  </VirtualHost>
  
  <VirtualHost _default_:8081>
  ServerName default2
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/default2
  </VirtualHost>
  
  
  
  1.1                  apachen/src/test/vhtest/conf/test6.conf
  
  Index: test6.conf
  ===================================================================
  Include /home/dgaudet/ap/vhtest/conf/common.conf
  
  ## expect a warning about mixing * and non-* ports on vhost 127.0.0.1:8080
  NameVirtualHost 127.0.0.1:*
  
  <VirtualHost 127.0.0.1:8080>
  ServerName vhost1
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost1
  </VirtualHost>
  
  ## expect a warning about mixing * and non-* ports on vhost 127.0.0.2:0
  NameVirtualHost 127.0.0.2:8081
  
  <VirtualHost 127.0.0.2:*>
  ServerName vhost2
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost2
  </VirtualHost>
  
  ## expect a warning about overlapping _default_ on port 8080
  <VirtualHost _default_>
  ServerName default1
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/default1
  </VirtualHost>
  
  <VirtualHost _default_:8080>
  ServerName default2
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/default2
  </VirtualHost>
  
  ## expect a warning about overlapping virtualhosts on 127.0.0.3:8080
  <VirtualHost 127.0.0.3>
  ServerName vhost3
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost3
  </VirtualHost>
  
  <VirtualHost 127.0.0.3>
  ServerName vhost4
  DocumentRoot /home/dgaudet/ap/vhtest/docroot/vhost4
  </VirtualHost>
  
  ## expect all warnings to be printed twice, and probably in the opposite
  ## order mentioned here
  
  
  
  1.1                  apachen/src/test/vhtest/docroot/default1/vhost.txt
  
  Index: vhost.txt
  ===================================================================
  default1
  
  
  
  1.1                  apachen/src/test/vhtest/docroot/default2/vhost.txt
  
  Index: vhost.txt
  ===================================================================
  default2
  
  
  
  1.1                  apachen/src/test/vhtest/docroot/default3/vhost.txt
  
  Index: vhost.txt
  ===================================================================
  default3
  
  
  
  1.1                  apachen/src/test/vhtest/docroot/main/vhost.txt
  
  Index: vhost.txt
  ===================================================================
  main
  
  
  
  1.1                  apachen/src/test/vhtest/docroot/vhost1/vhost.txt
  
  Index: vhost.txt
  ===================================================================
  vhost1
  
  
  
  1.1                  apachen/src/test/vhtest/docroot/vhost2/vhost.txt
  
  Index: vhost.txt
  ===================================================================
  vhost2
  
  
  
  1.1                  apachen/src/test/vhtest/docroot/vhost3/vhost.txt
  
  Index: vhost.txt
  ===================================================================
  vhost3
  
  
  
  1.1                  apachen/src/test/vhtest/docroot/vhost4/vhost.txt
  
  Index: vhost.txt
  ===================================================================
  vhost4
  
  
  
  1.1                  apachen/src/test/vhtest/docroot/vhost5/vhost.txt
  
  Index: vhost.txt
  ===================================================================
  vhost5
  
  
  

Mime
View raw message