httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <r...@imdb.com>
Subject Bug or feature? virtual host with port, Apache 1.2.0 (fwd)
Date Mon, 23 Jun 1997 23:01:16 GMT

More questions for Dean...

---------- Forwarded message ----------
Date: Mon, 23 Jun 1997 09:24:39 +0100 (BST)
From: WWW server manager <webadm@info.cam.ac.uk>
To: apache-bugs@apache.org
Subject: Bug or feature? virtual host with port, Apache 1.2.0

It's unclear from the documentation (and a quick glance at the source code)
whether what I was trying to do is supported but broken, unspported and/or 
misguided, or an unusual case that hadn't really been thought about. Anyway...

In addition to our main server, we have a test server intended only for 
access by Computing Service staff, with appropriate restrictions on which 
systems can access it. This is with Solaris 2.4 (SPARCserver 10/51), and
running in a chroot()ed environment, and the test server is running on a 
non-default port on the same system as the (independent, separate 
config/process pool/chroot environment ) public server.

Yesterday, I tried to set up a virtual host in the test server with the
aim of giving webmasters elsewhere in the University access to some specific
documents (primarily, the chance to try out a CGI script) without allowing
wider access to the rest of the test server or publicising its port number.

Rather than setting up a new chroot environment, updating automount maps to
get the required files to appear in the new chroot environment, etc., I 
decided the "obvious" approach was to define a virtual server which was on
the same host but using a different por, within the configuration files of the 
existing test server.

However... while the server behaved normally when either HUP'd or stopped and 
restarted afer setting up a variety of variant configuration changes, and
spot-checking the server-info page during one of the tests showed it had
recognised the virtual hosts configuration directives (it listed the details
correctly), none of the variations on the <VirtualHost> directive that I tried
caused it to actually listen on the designated port (I tried several,
non-privileged, ports, and the server is started as root - changing to nobody -
anyway). The alternatives I tried were 

<VirtualHost hostname:1357>
        (for hostname=the canonical name and its www.xxx alias)
<VirtualHost nn.nn.nn.nn:1357>
        (using the IP address, I think that one was accepted)
<VirtualHost :1357>
        (i.e. just port number, intended to imply same host as the 
        existing non-virtual server, which behaved normally throughout the 
        tests).

The appearance is that the virtual host definition is accepted as valid, 
but for some reason then entirely ignored, at least as far setting up a listen 
on the designated port is concerned. netstat -a showed nothing listening to the 
port, and attempting to connect with ta browser or telnet got "Connection 
refused".

Should this have worked in the way I expected? Or is setting up a virtual host 
using a different port on the non-virtual server's hostname not supported, if 
only perhaps through that case having been overlooked? I realise that virtual 
hosts are most commonly used to allow multiple servers on the default port, but 
it seemed an entirely appropriate solution to the particular requirement in 
this case, too!

                                John Line
-- 
University of Cambridge WWW manager account (usually John Line)
Send general WWW-related enquiries to webmaster@ucs.cam.ac.uk


Mime
View raw message