On 9/7/06, Vlad Seryakov <[EMAIL PROTECTED]> wrote:
Auto magic i do not like myself but it seems too restrictive to have
some dummy server definition to start server if there will be only one
server anyway. Virtual servers are good feature for advanced use, we
used them before when had multiple servers.


It isn't a dummy server, it's needed.  The current example-config.tcl
is wrong in a number of respects, for example this comment:

#
# Server-level configuration
#
#  There is only one server in naviserver, but this is helpful when multiple
#  servers share the same configuration file.  This file assumes that only
#  one server is in use so it is set at the top in the "server" Tcl variable.
#  Other host-specific values are set up above as Tcl variables, too.
#

There isn't only one server!  All Tcl commands and procs *have* to run
in the context of a virtual server, even if there's only one.

Yes, you can have global modules.  But not if they register Tcl
commands!  Which virtual server context do they run with?

I guess you could write a module such that when it's loaded globally,
it roots around for all virtual servers and adds it's Tcl commands to
each. But they don't do that...

The idea of creating a default virtual server magically hides this
important distinction, which makes it harder over all for people to
understand what's going on.


But to start one simple web server, i think it does not need to be that
complicated, enabling module you want and have it running is good way to
immediately see it working. I agree, making it open or less secure just
to be able simply run is bad, but if security is not involved and no
changes in the core for running default/complex configs, maybe it is not
that bad once it documented and logged?


Unfortunately you can't tell when security is involved or important,
so defaults matter and must be conservative.  Luckily, it's trivial to
enable to enable modules.

I think that a simple-config.tcl will improve the situation 100%.
Without all the esoteric config values, which should default to
something sane anyway, the config file should fit on a couple of
screens or so, singe virtual server included.


Stephen Deasey wrote:
> On 9/7/06, Vlad Seryakov <[EMAIL PROTECTED]> wrote:
>> - if no servers defined, it will run server "default", i.e. it silently
>> creates server "default" in config section "ns/servers"
>
>
> Er, no.
>
> No crazy magic to auto-create config behind your back.  Virtual
> servers just aren't complicated.  They're a feature, and they're
> embedded deeply into the core code (all the references to char *server
> in the C API) so it's not going any where quickly.
>
> I agree with your over all goal, which is to have a minimal config
> file able to boot and run a functional server, right?  This is
> definitely a good idea.
>
> The current sample-config.tcl doesn't handle this case well, and it
> shouldn't -- it's supposed to be a complete reference to all config
> values.
>
>
> So, we need some other way to handle basic servers.  Magic config
> construction just isn't the way to do it though.  How about we move
> nsd-min.tcl you just added to contrib (dumping ground, grrr...) into
> the top level, and call it simple-config.tcl?
>
> We'll have two config files ship by default:
>
>   sample-config.tcl -- Exhaustive list of all config variables
>   simple-config.tcl -- Basic config needed to run a single virtual server.
>
> They will be identical in the sense that the resulting running server
> will have the same properties, because the sample-config.tcl will be
> illustrating *optional* config values, and possibly they''' all be
> commented out.
>
> We can rename 'server1' to 'default' if you like.
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> naviserver-devel mailing list
> naviserver-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/naviserver-devel
>

--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel


Reply via email to