> -----Original Message-----
> From: AOLserver Discussion [mailto:[EMAIL PROTECTED]]On Behalf
> Of Peter M. Jansson
> Sent: 16 January 2003 22:25
> To: [EMAIL PROTECTED]
> Subject: Re: [AOLSERVER] AOLserver 4: Virtual server fix
>
>
> It occurs to me there's another way, which you may or may not regard as an
improvement:

Yep that was the other way I found.  Dunno which is 'better' I'm too new to
AOLserver



>
> ns_section ns/modules
> ns_param nssock ${bindir}/nssock${ext}
> ns_param nssock8080 ${bindir}/nssock${ext}
>
> ns_section  ns/module/nssock
> ns_param    hostname                $hostname
> ns_param    address                 $address
> ns_param        port                            $httpport
>
> ns_section  ns/module/nssock

I take it you meant:

ns_section  ns/module/nssock8080

> ns_param    hostname                $hostname
> ns_param    address                 $address
> ns_param        port                            8080
>
> ns_section  ns/module/nssock/servers
> ns_param        test                            test.mysite.net
>
> ns_section  ns/module/nssock8080/servers
> ns_param        test8080                        test.mysite.net


Yep that all makes sense too.

My investigations all started when trying to find a way to have different
"location" settings for each virtual server.



> In the configuration you've done, you can omit the second line in
> ns/module/nssock/servers (the one for test8080) because it has no effect;
> you're overriding the host-mapping by binding a separate nssock to the
> test8080 virtual server.

Yes, just noticed it made no difference if it was there or not.


Well either way it seems to do the trick (which is good considering you
thought yesterday that it didn't) !






>
> But what I've just written should work...
>
> On Thursday, January 16, 2003, at 05:15 PM, Tim Moss wrote:
>
> > Peter,
> >
> > got vhosting with same named virtual server 'test.mysite.net' with
> > different
> > ports working no problems
> > (going to the same AOLserver 'test')
> >
> > also works when you have the same hostname 'test.mysite.net'
> > with different ports (80 and 8080) going to different
> AOLservers test and
> > test8080.
> >
> > so in my config file (top 'global' section) I have:
> >
> >
> > # set up the different virtual servers
> > ns_section  ns/servers
> > ns_param        test                            "test server"
> > ns_param        test8080                        "test server on 8080"
> >
> > ns_section  ns/modules
> > ns_param    nssock                  ${bindir}/nssock${ext}
> >
> > ns_section  ns/module/nssock
> > ns_param    hostname                $hostname
> > ns_param    address                 $address
> > ns_param        port                            $httpport
> >
> >
> > (so far just as you suggested yesterday)
> >
> > ns_section  ns/module/nssock/servers
> > ns_param        test                            test.mysite.net
> > ns_param        test8080                        test.mysite.net:8080
> >
> > (pretty much as you suggested)
> >
> >
> > then in the bit in the loop (per server config)
> >
> > if {$servername == "test8080"} {
> > ns_section  ns/server/$servername/module/nssock
> > ns_param    hostname                $hostname
> > ns_param    address                 $address
> > ns_param    port                    8080
> > ;# Port for HTTP (typically 80)
> > ns_section  ns/server/${servername}/modules
> > ns_param    nssock   ${bindir}/nssock${ext}
> > }
> >
> >
> > If I now connect to test.mysite.net  I get my normal testsite index page
> >
> > If I connect to test.mysite.net:8080 I get a directory listing (as I've
> > not
> > added anything into the pageroot yet!)
> > Proves that different ports on the same name go to different virtual
> > servers.
> >
> >
> > HTH,
> >
> >
> >
> > regards,
> >
> > Tim Moss
> > SiteSpeed Ltd
> > Mobile:         0 77 9613 4891
> > Email:          [EMAIL PROTECTED]
> > Website:        http://www.site-speed.com
> >
> > This email contains information from SiteSpeed Ltd, which may be
> > privileged
> > or confidential. If you are not the intended recipient, be
> aware that any
> > disclosure, copying, distribution or use of the contents of this
> > information
> > is prohibited. If you have received this electronic message in error,
> > please
> > notify us immediately.
> >
> >
> >
> >> -----Original Message-----
> >> From: AOLserver Discussion [mailto:[EMAIL PROTECTED]]On Behalf
> >> Of Peter M. Jansson
> >> Sent: 16 January 2003 02:02
> >> To: [EMAIL PROTECTED]
> >> Subject: Re: [AOLSERVER] AOLserver 4: Virtual server fix
> >>
> >>
> >> On Wednesday, January 15, 2003, at 06:56 PM, Tim Moss wrote:
> >>
> >>> OK, all patches applied and rebuilt.
> >>>
> >>> All seems to be working - thank you very much for your help Peter.
> >>
> >> Glad to help.
> >>
> >>> By the way here's my config file: (might be a neat way to avoid having
> >>> a
> >>> huge config file)
> >>
> >> I do something similar, and I allow for sourcing an
> additional, optional
> >> file for each virtual (in my for loop, I test for existence of a file,
> >> and
> >> source it if it's there).
> >>
>

Reply via email to