Dean Baender wrote:
> 3. nssmartvh-2.0 ( )
> Building nssmartvh-2.0 gives a compiler warning from nssmartvh.c that
> 'control reaches end of non-void function' in funct 'NsSmartVhCmd'.
> Not a big deal, just thougth I'd note it.
It never bugged me and I guess I didn't pay too much attention to
compilation process. But it works fine for me :)
> The docs are a little non-existant about the syntax of the
> aolserver-vhosts file. I think it should look like:
>
> aolserver-vhosts:
> <hostname> <vhost doc root>
Not quite ;) The syntax is a bit nasty:
This is how I use it at one host:
sre {"dq.pl|dataquest.pl" /var/www/dataquest/WWW}
sre {"(**?)(.dq|.dataquest|.com|.net|.art|.org|)(|.pl)"
/var/www/\\1/WWW}
The first one defines that dq.pl or dataquest.pl (and
www.dq.pl/www.dataquest.pl [:)] has docroot in /var/www/dataquest/WWW. It
is what most people should be happy about - a simple vhost->path method
[:)]
The second one is quite universal - it says that most domains have
docroot in /var/www/<domain>/WWW - ie www.dq-e.com will have
/var/www/dq-e/WWW.
Another config:
sre {tcl.pl /usr/local/aolserver/htdocs/tcl.pl}
sre {test2.tcl.pl /usr/local/aolserver/htdocs/test2.tcl.pl}
sre {dataquest.pl /home/d/dquest/public_html}
sre {mgid.com.pl /home/m/mgid/public_html}
sre {as.tcl.pl /home/w/ws/public_html}
xuser {"(**).tcl.pl" public_html}
It defines that 5 domains have these docroots. The last one is cool - it
says that www.username.tcl.pl is docrooted to ~username/public_html,
also www.something.user.tcl.pl is docrooted to ~user/public_html/something.
You might want to read modules/tcl/nssmartvh/init.tcl and the do_sre (it
converts the above expressions to regexp) and m_sre.tcl, m_xuser.tcl.
Unfortunately I don't have time to focus on the docs part :( But I'm
open to help on this matter ;)
> of course without the "<" and ">" in the file. So I have
>
> www.local.example.com /web/servers/server1/vhost/web-main/pages
> web-test.local.example.com /web/servers/server1/vhost/web-test/pages
sre {local.example.com /web/servers/server1/vhost/web-main/pages}
sre {web-test.local.example.com /web/servers/server1/vhost/web-test/...}
> Now the funny thing is that nssmartvh says it's mapping
> "local.example.com"->"/web/servers/server1/pages" and
> "web-test..."->"/web/servers/server1/pages"
Try the thingie above. Unfortunately I haven't got the time to document
it clearly :(
Maybe someone in this group would like to? :)
> 4. I guess the last vhost option is the nsunix/nsvhr combo, but I
> haven't tried it yet. It seems like a bit of a heavyweight solution
> for my very modest needs.
And it's probably can be a PITA for >100 vhosts (the system will
probably run out of memory/pids :).
--
WK