Thorpe,

Not sure exactly, I wrote the code you are using as an example only, although 
it seems to work. You could take the short route and do this:

Maybe put a logging statement inside the filters so that we know they fire. 
You can also test urls directly /www.xyc/, etc. This should at least show if 
the filter is firing on the correct glob pattern.

tom jackson

On Tuesday 27 February 2007 14:51, Thorpe Mayes wrote:
> Tom,
>
> Thank you. I fixed the nsd file so that the nsrewrite module
> loads...and, it does load.
>
> I modified the /etc/hosts file to look like this:
>
>       127.0.0.1               tmayes www.tmayes thorpemayes www.thorpemayes
> localhost.localdomain localhost
>
>
> I added these two folders under $pageroot:
>
>       tmayes.com
>
>       thorpemayes.com
>
> and put an index.tcl file in each one.
>
> When I put http://tmayes.com into the browser, it works (i.e. the
> index.tcl file in the $pageroot/tmayes.com folder is displayed). Same
> when I load http://thorpemayes.com into the browser.
>
> However, when I load http://www.tmayes.com into the browser I get a
>
> Not Found
>   The requested URL was not found on this server.
>
> error. Same when I load http://www.thorpemayes.com into a browser.
>
>
> This is what the server.log entry looks like:
>
> [27/Feb/2007:16:37:39][31330.3072002976][-conn:4-] Notice:
> rewriteRequest: starturl: '/'
> [27/Feb/2007:16:37:39][31330.3072002976][-conn:4-] Notice:
> rewriteRequest: newurl: '/www.thorpemayes.com/'
> [27/Feb/2007:16:37:39][31330.3072002976][-conn:4-] Notice: finalURL:
> URL: '/www.thorpemayes.com/'
>
>
> It does not look like the rewriteWWW proc is being called. Here is that
> code in the rewriteurl.tcl file:
>
> # Fire rewriteRequest on every request
> ns_register_filter preauth GET /* rewriteRequest
>
> # rewrite URLs beginning with www:
> ns_register_filter preauth GET /www.* rewriteWWW
>
> # show final URL in trace filter
> ns_register_filter trace GET /* finalURL
>
>
> Any ideas?
>
> Best regards,
>
> Thorpe
>
> On Feb 27, 2007, at 3:35 PM, Tom Jackson wrote:
> > Thorpe,
> >
> > Looks like you have not added nsrewrite.so to the list of modules to
> > load.
> >
> > tom jackson
> >
> > On Tuesday 27 February 2007 12:32, Thorpe Mayes wrote:
> >> I am trying to install nsrewrite aolserver module and use it in the
> >> virtual
> >> hosting module per Tom Jackson
> >> (http://rmadilo.com/files/nsrewrite/doc/nsrewriteurl.html) .
> >>
> >> I downloaded the nsrewrite files and did the install. Here is the
> >> result of
> >> the install:
> >>
> >> make install
> >> /usr/local/bin/tclsh8.4 /usr/local/aolserver/bin/nsinstall.tcl -d
> >> /usr/local/aolserver/bin -e nsrewrite.so
> >> installed: /usr/local/aolserver/bin/nsrewrite.so (0755)
> >> /usr/local/bin/tclsh8.4 /usr/local/aolserver/bin/nsinstall.tcl -d
> >> /usr/local/aolserver/lib -e libnsrewrite.so
> >> installed: /usr/local/aolserver/lib/libnsrewrite.so (0755)
> >> /usr/local/bin/tclsh8.4 /usr/local/aolserver/bin/nsinstall.tcl -d
> >> /usr/local/aolserver/lib libnsrewrite.a
> >> installed: /usr/local/aolserver/lib/libnsrewrite.a (0644)
> >> ranlib /usr/local/aolserver/lib/libnsrewrite.a
> >>
> >>
> >> Looks like it installed okay.
> >>
> >> I then put the rewriteurl.tcl file in
> >> /usr/local/aolserver/modules/tcl.
> >>
> >> I restarted aolserver - and it restated - and it looks like the
> >> rewriteurl
> >> filters loaded as well:
> >>
> >> [27/Feb/2007:14:03:27][30188.3084097216][-main-] Notice: nsmain:
> >> AOLserver/4.5.0 exiting
> >> [27/Feb/2007:14:03:38][30740.3083802304][-main-]
> >> Notice: nsmain: AOLserver/4.5.0 starting
> >> [27/Feb/2007:14:03:38][30740.3083802304][-main-] Notice: nsmain:
> >> security
> >> info: uid=513, euid=513, gid=513, egid=513
> >> [27/Feb/2007:14:03:38][30740.3083802304][-main-] Notice: nsmain: max
> >> files:
> >> FD_SETSIZE = 1024, rl_cur = 1024, rl_max = 1024
> >> [27/Feb/2007:14:03:38][30740.3083802304][-main-] Notice:
> >> fastpath[server1]:
> >> mapped GET / [27/Feb/2007:14:03:38][30740.3083802304][-main-] Notice:
> >> fastpath[server1]: mapped HEAD /
> >> [27/Feb/2007:14:03:38][30740.3083802304][-main-] Notice:
> >> fastpath[server1]:
> >> mapped POST / [27/Feb/2007:14:03:38][30740.3083802304][-main-] Notice:
> >> adp[server1]: mapped GET /*.adp
> >> [27/Feb/2007:14:03:38][30740.3083802304][-main-] Notice: adp[server1]:
> >> mapped HEAD /*.adp [27/Feb/2007:14:03:38][30740.3083802304][-main-]
> >> Notice:
> >> adp[server1]: mapped POST /*.adp
> >> [27/Feb/2007:14:03:38][30740.3083802304][-main-] Notice: modload:
> >> loading
> >> '/usr/local/ aolserver/bin/nssock.so'
> >> [27/Feb/2007:14:03:38][30740.3083802304][-main-] Notice: modload:
> >> loading
> >> '/usr/local/ aolserver/bin/nslog.so'
> >> [27/Feb/2007:14:03:38][30740.3083802304][-main-] Notice: nslog: opened
> >> '/usr/local/ aolserver/servers/server1/access.log'
> >> [27/Feb/2007:14:03:38][30740.3083802304][-main-] Notice: modload:
> >> loading
> >> '/usr/local/ aolserver/bin/nsperm.so'
> >> [27/Feb/2007:14:03:38][30740.3083802304][-main-] Notice: modload:
> >> loading
> >> '/usr/local/ aolserver/bin/nsxml.so'
> >> [27/Feb/2007:14:03:38][30740.3083802304][-main-] Notice: nsxml module
> >> starting [27/Feb/2007:14:03:38][30740.3083802304][-main-] Notice:
> >> conf:
> >> [ns/server/ server1]enabletclpages = 1
> >> [27/Feb/2007:14:03:38][30740.3083802304][-main-] Notice: tcl:
> >> enabling .tcl
> >> pages [27/Feb/2007:14:03:38][30740.3083802304][-main-] Notice:
> >> tcl/rewriteurl.tcl: loading test rewrite filters...
> >> [27/Feb/2007:14:03:38][30740.3083802304][-main-] Notice:
> >> tcl/rewriteurl.tcl: finished loading test rewrite filters.
> >> [27/Feb/2007:14:03:38][30740.3083802304][-main-] Notice: nsmain:
> >> AOLserver/4.5.0 running
> >> [27/Feb/2007:14:03:38][30740.3083802304][-main-]
> >> Notice: nsmain: security info: uid=513, euid=513, gid=513, egid=513
> >> [27/Feb/2007:14:03:38][30740.3083802304][-main-] Notice: driver:
> >> starting:
> >> nssock [27/Feb/2007:14:03:38][30740.3073223584][-sched-] Notice:
> >> sched:
> >> starting [27/Feb/2007:14:03:38][30740.3071683488][-nssock:driver-]
> >> Notice:
> >> starting [27/Feb/2007:14:03:38][30740.3071683488][-nssock:driver-]
> >> Notice:
> >> nssock: listening on 64.58.34.71:80
> >>
> >>
> >> Then, when I try to load a page, I get this error is the server.log:
> >>
> >> [27/Feb/2007:14:04:15][30740.3071544224][-conn:0-] Notice:
> >> rewriteRequest:
> >> starturl: '/' [27/Feb/2007:14:04:15][30740.3071544224][-conn:0-]
> >> Error: Tcl
> >> exception: invalid command name "ns_rewriteurl"
> >>     while executing
> >> "ns_rewriteurl $new_url"
> >>     (procedure "rewriteRequest" line 10)
> >>     invoked from within
> >> "rewriteRequest preauth"
> >> [27/Feb/2007:14:04:15][30740.3071544224][-conn:0-] Notice: finalURL:
> >> URL:
> >> '/'
> >>
> >>
> >> What am I missing?
> >>
> >> Thank you.
> >>
> >> Thorpe
> >>
> >>
> >> --
> >> AOLserver - http://www.aolserver.com/
> >>
> >> To Remove yourself from this list, simply send an email to
> >> <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in
> >> the
> >> email message. You can leave the Subject: field of your email blank.
> >
> > --
> > AOLserver - http://www.aolserver.com/
> >
> > To Remove yourself from this list, simply send an email to
> > <[EMAIL PROTECTED]> with the
> > body of "SIGNOFF AOLSERVER" in the email message. You can leave the
> > Subject: field of your email blank.
>
> Thorpe Mayes
> eCognizant LLC
> 3840 Cobble Circle
> Norman, Oklahoma 73072
> (405) 514-9753
> [EMAIL PROTECTED]
>
>
> --
> AOLserver - http://www.aolserver.com/
>
> To Remove yourself from this list, simply send an email to
> <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the
> email message. You can leave the Subject: field of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to