Re: [AOLSERVER] Multiple Domains with one IP

2003-01-04 Thread Dossy
On 2003.01.04, Wolfgang Winkler <[EMAIL PROTECTED]> wrote:
>
> Where can I find the nsunix and nsvhr module for aolserver 3.4.2? I
> downloaded them for the 3.2 server but don't know where that was.

If someone could put them in the File List section of the AOLserver
SF project, that'd be good.

http://sourceforge.net/project/showfiles.php?group_id=3152

They're not there, currently.

-- Dossy

--
Dossy Shiobara   mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/
  "He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)



Re: [AOLSERVER] Multiple Domains with one IP

2003-01-04 Thread Wolfgang Winkler
Hi!

Where can I find the nsunix and nsvhr module for aolserver 3.4.2? I
downloaded them for the 3.2 server but don't know where that was.

Thanks

Wolfgang



Re: [AOLSERVER] Multiple Domains with one IP

2003-01-03 Thread Michael Richman
In a message dated 1/3/2003 1:05:34 PM Central Standard Time, [EMAIL PROTECTED] writes:


#ns_section ns/modules
#ns_section nssock nssock.so

The second line of this sample config snippet should read

   ns_param nssock nssock.so

__
michael richman 
princ software engineer
aol infrastructure dev
214.442.6048


Re: [AOLSERVER] Multiple Domains with one IP

2003-01-03 Thread Jim Davidson
In a message dated 1/3/2003 2:07:06 PM Eastern Standard Time, [EMAIL PROTECTED] writes:

>Here's another variant which could be useful.  AOLserver 4.0 allows you to
>load the nssock driver outside a specific virtual server and then map to
>virtual servers via the Host header.  As with old 2.x virtual servers, you
>can then have separate virtual server configs, for example, separate access
>log files.  There's an example of such configuration in the sample-config.tcl
>-- I've pasted it below.

With this approach, all virtual servers share the same Tcl interpreter
pool, right?  Or does each virtual server get its own interpreters, not
shared with the other virtual servers?


As with 2.x, each virtual server gets it own Tcl state.  This is handled in the code by storing per-server Tcl state (e.g., library directory) in the tcl struct within the NsServer struct which is pointed to by the NsInterp struct, often the clientData passed to the various Tcl commands.  Got that :)   A code snippet for the ns_info command shows how this works for "ns_info library".

The merits of virtual servers have been debated for some time back here at AOL.  The feature/complexity got into the code as part of our web hosting initiatives back in 1995, we don't use it now.  It's back in 4.0 really for completeness.  I suspect folks who are interesting in big hosting setups may find value in the approach.

-Jim



int
NsTclInfoObjCmd(ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj **objv)
{
    NsInterp *itPtr = arg;
    char *elog;
    Tcl_DString ds;

    

    case ITclLibIdx:
    case IPageRootIdx:
    case IServerIdx:
    if (itPtr->servPtr == NULL) {
    Tcl_SetResult(interp, "no server", TCL_STATIC);
    return TCL_ERROR;
    }
    if (opt == IServerIdx) {
    Tcl_SetResult(interp, itPtr->servPtr->server, TCL_STATIC);
    } else if (opt == ITclLibIdx) {
    Tcl_SetResult(interp, itPtr->servPtr->tcl.library, TCL_STATIC);
    } else {
    Tcl_SetResult(interp, itPtr->servPtr->fastpath.pageroot, TCL_STATIC);
    }
    }


Re: [AOLSERVER] Multiple Domains with one IP

2003-01-03 Thread Dossy
On 2003.01.03, Jim Davidson <[EMAIL PROTECTED]> wrote:
>
> Here's another variant which could be useful.  AOLserver 4.0 allows you to
> load the nssock driver outside a specific virtual server and then map to
> virtual servers via the Host header.  As with old 2.x virtual servers, you
> can then have separate virtual server configs, for example, separate access
> log files.  There's an example of such configuration in the sample-config.tcl
> -- I've pasted it below.

With this approach, all virtual servers share the same Tcl interpreter
pool, right?  Or does each virtual server get its own interpreters, not
shared with the other virtual servers?

-- Dossy

--
Dossy Shiobara   mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/
  "He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)



Re: [AOLSERVER] Multiple Domains with one IP

2003-01-03 Thread Jim Davidson

Hello,

Here's another variant which could be useful.  AOLserver 4.0 allows you to load the nssock driver outside a specific virtual server and then map to virtual servers via the Host header.  As with old 2.x virtual servers, you can then have separate virtual server configs, for example, separate access log files.  There's an example of such configuration in the sample-config.tcl -- I've pasted it below.

-Jim


#
# Example: Host headers based virtual servers.
#
# To enable:
#
# 1. Load comm driver(s) globally.
# 2. Configure drivers as in a virtual server.
# 3. Add a "servers" section to map virtual servers to Host headers.
#
#ns_section ns/modules
#ns_section nssock nssock.so
#
#ns_section ns/module/nssock
#ns_param   port    $httpport
#ns_param   hostname    $hostname
#ns_param   address $address
#
#ns_section ns/module/nssock/servers
#ns_param server1 $hostname:$httpport
#


Re: [AOLSERVER] Multiple Domains with one IP

2003-01-03 Thread Peter M. Jansson
On Friday, January 3, 2003, at 01:01 PM, Dossy wrote:


Doing reverse-proxy with nssock, you only see the IP address of your
reverse-proxy in your nslog ... with nsunix, you see the IP address of
the actual requesting client.  This is important to some people, me
included.


Funny,  I was just going to post a note asking how people got around the
issue of access logs when using multiple proxies.  Now I know, and I agree
that getting actual peer addresses makes nsvhr/nsunix much more valuable.



Re: [AOLSERVER] Multiple Domains with one IP

2003-01-03 Thread Dossy
On 2003.01.03, Daniel P. Stasinski <[EMAIL PROTECTED]> wrote:
>  > Apparently in the latest version, nsvhr and nsunix work
>  > out-of-the-box, although confirmation of this is sketchy.
>
> They work flawlessly, out of the box, with 3.4.2 and 3.5.x.

Thanks to Jerry Asher and Dan Stasinski, of course.  :-)

-- Dossy

--
Dossy Shiobara   mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/
  "He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)



Re: [AOLSERVER] Multiple Domains with one IP

2003-01-03 Thread Dossy
On 2003.01.03, Peter M. Jansson <[EMAIL PROTECTED]> wrote:
> Apparently in the latest version, nsvhr and nsunix work
> out-of-the-box, although confirmation of this is sketchy.

Indeed, they should work out-of-the-box on 3.5.x, and I can personally
attest to it, but nobody else has spoken up saying they're using it.

Is anyone out there using nsvhr/nsunix out there?  Anyone?

> If you want to use the reverse-proxy approach, you're probably best
> using TCP connections (it's not clear there are performance advantages
> from using Unix domain sockets, as far as I know).

As you said, the performance advantages aren't really big: if you do
things right, you'll bind the virtual server's socket to localhost (your
loopback interface) so opening/tearing down sockets isn't too terribly
slow.

The only advantage of running nsvhr with nsunix is that with nsunix we
do FD passing, which gives the virtual server access to the actual
client's socket -- which includes their peer address.  Doing
reverse-proxy with nssock, you only see the IP address of your
reverse-proxy in your nslog ... with nsunix, you see the IP address of
the actual requesting client.  This is important to some people, me
included.

-- Dossy

--
Dossy Shiobara   mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/
  "He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)



Re: [AOLSERVER] Multiple Domains with one IP

2003-01-03 Thread Daniel P. Stasinski
 > Apparently in the latest version, nsvhr and nsunix work
 > out-of-the-box, although confirmation of this is sketchy.

They work flawlessly, out of the box, with 3.4.2 and 3.5.x.

Daniel P. Stasinski
Software Engineer
Mayor Pharmaceutical Laboratories
[EMAIL PROTECTED]



Re: [AOLSERVER] Multiple Domains with one IP

2003-01-03 Thread Peter M. Jansson
By now, you seem to have links to most of the major virtual domain
implementations for AOLserver; what you might not have is some data for
figuring out which to use.  I can fill in a little...

Since AOLserver 3.x, virtual domains are no longer supported in AOLserver
(although they are coming back for 4.x).  AOlserver 3.x runs a server with
a single name on one or more IP addresses, but it has a single responder
for all listeners.  Generally, there are two approaches to achieving
virtual domains with AOLserver 3.x:

- Run multiple instances of AOLserver on a private IP address and private
ports, and use a front-end webserver (which could be AOLserver or could be
some other webserver) to reverse-proxy the incoming traffic to the
appropriate AOLserver instance

- Install code that intercepts the request, divine the intended virtual
server from the intended IP address and any Host headers in the request,
and handle the request locally, using different code depending on the
virtual server.

One variant of the first strategy is to use one AOLserver running nsvhr,
and multiple instances running nsunix; this runs the virtual instances
over a Unix domain socket, instead of a TCP/IP socket, which helps to
conserve ports, and does not expose the virtual instances to the network,
but has been historically buggy, unable to run out-of-the-box without
patches.  Apparently in the latest version, nsvhr and nsunix work
out-of-the-box, although confirmation of this is sketchy.  If you want to
use the reverse-proxy approach, you're probably best using TCP connections
(it's not clear there are performance advantages from using Unix domain
sockets, as far as I know).

There are several modules that implement the second approach, and each
works slightly differently, but all seem to work well.

Unless you use separate instances for the,, Virtual servers on AOLserver 3.
x really just let you separate the static content; you don't get separate
Tcl interpreters, and you don't get the suexec for CGI (although you can
use CGIWrap).   You can still get a lot of mileage out of it, though.

Hope this helps.

   Pete.

On Friday, January 3, 2003, Mike wrote:


Ok I got aolserver working so what do I need to do to setup two websites
to point to one IP I could easily do it with apache but this server is
whole new ball game. ;)




Re: [AOLSERVER] Multiple Domains with one IP

2003-01-03 Thread Tim Moss
There are several 'virtual hosting' modules out there that will do the job.
Some are 100% C others are 100% Tcl, others are a mixture.

I'm using nssmartvh running on Win2K (development), as I couldn't get nsunix
and nsvhr to build very easily.
There's also 'vhost' 'tclvhr' and 'dqe' modules that implement virtual
hosting.

I'm new to all of this so I couldn't tell you which is best for you - it may
depend on your platform, how many virtual hosts you want, how complex you
want to get with it.

Hopefully someone else on the list can give you some further pointers on
this.

regards,

Tim
__

Tim Moss
Chief Technology Architect
BrowserAngel

e : [EMAIL PROTECTED]
w : www.browserangel.com
t : +44 (0) 77 9613 4891
__



> -Original Message-
> From: AOLserver Discussion [mailto:[EMAIL PROTECTED]]On Behalf
> Of Michael Pratt
> Sent: 03 January 2003 13:39
> To: [EMAIL PROTECTED]
> Subject: [AOLSERVER] Mutiple Domains with one IP
>
>
> Ok I got aolserver working so what do I need to do to setup two
> websites to
> point to one IP I could easily do it with apache but this server is whole
> new ball game. ;)
>
>
>
> Thanks!
> Mike
>