Hi... on my way testing roxen i was wondering how i could use zope + virtualhostmonster with it. I was using apache with a rewrite rule RewriteRule ^/(.*) http://localhost:8080/VirtualHostBase/http/www.test.com:80/test.com/VirtualH... [P] and i tried to do the same thing in roxen, adding the http relay module to a site and set a relay pattern: MATCH ^/(.*) CALL http://localhost:8080/VirtualHostBase/http/www.test.com:80/test.com/VirtualHostRoot/\1 which should to the same in my opinion. Well.. it doesn't. Pointing my browser to www.test.com i'll end up with getting nothing, the browser trying all the time to open something but it never gets an answer. roxen says, it got a request which matched the regex ^/(.*) but it doesn't seem to successfully connect to zope. Any suggestions ? Best Regards, Justin
+-------[ Justin Heesemann ]---------------------- | Hi... | MATCH ^/(.*) CALL http://localhost:8080/VirtualHostBase/http/www.test.com:80/test.com/VirtualHostRoot/\1 I normally use a slightly different one... MATCH ^(.*)$ CALL http://localhost:8080\1 No beginning / on the regex, and no trailing / on the URL, So this would translate for you into; MATCH ^(.*)$ CALL http://localhost:8080/VirtualHostBase/http/www.test.com:80/test.com/VirtualHostRoot\1 -- Totally Holistic Enterprises Internet| | Andrew Milton The Internet (Aust) Pty Ltd | | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068 |akm@theinternet.com.au|
On 27/9/01 11:54 am, "Andrew Kenneth Milton" <akm@theinternet.com.au> wrote:
+-------[ Justin Heesemann ]---------------------- | Hi...
| MATCH ^/(.*) CALL http://localhost:8080/VirtualHostBase/http/www.test.com:80/test.com/VirtualH... tRoot/\1
I normally use a slightly different one...
MATCH ^(.*)$ CALL http://localhost:8080\1
No beginning / on the regex, and no trailing / on the URL, So this would translate for you into;
MATCH ^(.*)$ CALL http://localhost:8080/VirtualHostBase/http/www.test.com:80/test.com/VirtualH... tRoot\1
This certainly works, but ... A document in the Zope tree with Roxen tags embedded in it, eg <gtext>Hello World</gtext> <tablist> <tab selected='selected'>About</tab> <tab>Info</tab> <tab>Browse</tab> </tablist> Comes out exactly like that, ie not rendered by Roxen. Am I missing sometyhing obvious here? I used to use Roxen 1.3 with the Zope.cgi fix (in the archives, search for Magnus and Roxen), but I want to have ZServer doing all its good stuff too. Anyone got any ideas? TIA Tone. -- Dr Tony McDonald, Assistant Director, FMCC, http://www.fmcc.org.uk/ The Medical School, Newcastle University Tel: +44 191 243 6140 A Zope list for UK HE/FE http://www.fmcc.org.uk/mailman/listinfo/zope
+-------[ Tony McDonald ]---------------------- | | Comes out exactly like that, ie not rendered by Roxen. | | Am I missing sometyhing obvious here? I used to use Roxen 1.3 with the | Zope.cgi fix (in the archives, search for Magnus and Roxen), but I want to | have ZServer doing all its good stuff too. Did you add RXML to the end of your match rule ? -- Totally Holistic Enterprises Internet| | Andrew Milton The Internet (Aust) Pty Ltd | | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068 |akm@theinternet.com.au|
On 28/9/01 3:10 pm, "Andrew Kenneth Milton" <akm@theinternet.com.au> wrote:
+-------[ Tony McDonald ]---------------------- | | Comes out exactly like that, ie not rendered by Roxen. | | Am I missing sometyhing obvious here? I used to use Roxen 1.3 with the | Zope.cgi fix (in the archives, search for Magnus and Roxen), but I want to | have ZServer doing all its good stuff too.
Did you add RXML to the end of your match rule ?
Aaack! Yup, works now (two smacks with the idiot stick for me!). It's making references to /_internal/ and this makes the graphics somewhat ... Less than useful! :) (for the Roxen-challenged this is an internal filesystem of images - they obviously don't exist in the Zope site). Oh 'eck, we're into regexp space now.... ^([A-Za-z0-9].*) does not work. Any regexp guru want to give me a clue? Tone. -- Dr Tony McDonald, Assistant Director, FMCC, http://www.fmcc.org.uk/ The Medical School, Newcastle University Tel: +44 191 243 6140 A Zope list for UK HE/FE http://www.fmcc.org.uk/mailman/listinfo/zope
+-------[ Tony McDonald ]---------------------- | On 28/9/01 3:10 pm, "Andrew Kenneth Milton" <akm@theinternet.com.au> wrote: | | > +-------[ Tony McDonald ]---------------------- | > | | > | Comes out exactly like that, ie not rendered by Roxen. | > | | > | Am I missing sometyhing obvious here? I used to use Roxen 1.3 with the | > | Zope.cgi fix (in the archives, search for Magnus and Roxen), but I want to | > | have ZServer doing all its good stuff too. | > | > Did you add RXML to the end of your match rule ? | | Aaack! | Yup, works now (two smacks with the idiot stick for me!). | ^([A-Za-z0-9].*) does not work. Any regexp guru want to give me a clue? Don't try to do this d;) You should use this (before your MATCH). LOCATION /_internal/ /_internal/ You can use ^(_<regex>) too if you want to. -- Totally Holistic Enterprises Internet| | Andrew Milton The Internet (Aust) Pty Ltd | | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068 |akm@theinternet.com.au|
On 28/9/01 3:40 pm, "Andrew Kenneth Milton" <akm@theinternet.com.au> wrote:
+-------[ Tony McDonald ]---------------------- | On 28/9/01 3:10 pm, "Andrew Kenneth Milton" <akm@theinternet.com.au> wrote: | | > +-------[ Tony McDonald ]---------------------- | > | | > | Comes out exactly like that, ie not rendered by Roxen. | > | | > | Am I missing sometyhing obvious here? I used to use Roxen 1.3 with the | > | Zope.cgi fix (in the archives, search for Magnus and Roxen), but I want to | > | have ZServer doing all its good stuff too. | > | > Did you add RXML to the end of your match rule ? | | Aaack! | Yup, works now (two smacks with the idiot stick for me!).
| ^([A-Za-z0-9].*) does not work. Any regexp guru want to give me a clue?
Don't try to do this d;)
I already did - a *huge* number of redirects resulted... ;)
You should use this (before your MATCH).
LOCATION /_internal/ /_internal/
You can use ^(_<regex>) too if you want to.
Ok, now I'm really baffled. I've installed 2.2.198, and have this as my HTTP Relay lines. LOCATION /_internal/ CALL /_internal/ MATCH ^(.*)$ CALL http://localhost:24580/VirtualHostBase/http/localhost:8765/VirtualHostRoot\1 RXML Everything works fine except for the images :( I've made the edit in relay2.pike that Justin mentioned. I *don't* have a filesystem set up as I want everything to go through Zope. Hang on .... Just added a filesystem to '/' - still the same :( Has anyone any ideas? Many thanks, Tone. -- Dr Tony McDonald, Assistant Director, FMCC, http://www.fmcc.org.uk/ The Medical School, Newcastle University Tel: +44 191 243 6140 A Zope list for UK HE/FE http://www.fmcc.org.uk/mailman/listinfo/zope
+-------[ Tony McDonald ]---------------------- | | Ok, now I'm really baffled. I've installed 2.2.198, and have this as my HTTP | Relay lines. | | LOCATION /_internal/ CALL /_internal/ | MATCH ^(.*)$ CALL | http://localhost:24580/VirtualHostBase/http/localhost:8765/VirtualHostRoot\1 | RXML | | Everything works fine except for the images :( In what way are they not working? | Hang on .... Just added a filesystem to '/' - still the same :( No, you don't need a filesystem. -- Totally Holistic Enterprises Internet| | Andrew Milton The Internet (Aust) Pty Ltd | | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068 |akm@theinternet.com.au|
On 29/9/01 3:12 pm, "Andrew Kenneth Milton" <akm@theinternet.com.au> wrote:
+-------[ Tony McDonald ]---------------------- | | Ok, now I'm really baffled. I've installed 2.2.198, and have this as my HTTP | Relay lines. | | LOCATION /_internal/ CALL /_internal/ | MATCH ^(.*)$ CALL | http://localhost:24580/VirtualHostBase/http/localhost:8765/VirtualHostRoot\1 | RXML | | Everything works fine except for the images :(
In what way are they not working?
Sorry, should have been more specific. The images are not showing up. If I select the image URL and enter it into the address bar, I get a Pike error; Bad argument 1 to replace(). Expected array|mapping|string With a Pike traceback.
| Hang on .... Just added a filesystem to '/' - still the same :(
No, you don't need a filesystem.
I thought not, but just wanted to check. So near and yet so far.... Cheers Tone. -- Dr Tony McDonald, Assistant Director, FMCC, http://www.fmcc.org.uk/ The Medical School, Newcastle University Tel: +44 191 243 6140 A Zope list for UK HE/FE http://www.fmcc.org.uk/mailman/listinfo/zope
+-------[ Tony McDonald ]---------------------- | | Sorry, should have been more specific. The images are not showing up. If I | select the image URL and enter it into the address bar, I get a Pike error; When all else fails, brute force and ignorance prevail. MATCH ^([a-z]*)$ CALL http://127.0.0.1:8080\1 RXML MATCH ^([A-Z]*)$ CALL http://127.0.0.1:8080\1 RXML MATCH ^([0-9]*)$ CALL http://127.0.0.1:8080\1 RXML MATCH ^/$ http://127.0.0.1:8080/ RXML substitute your URL obviously d;) -- Totally Holistic Enterprises Internet| | Andrew Milton The Internet (Aust) Pty Ltd | | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068 |akm@theinternet.com.au|
On 29/9/01 4:00 pm, "Andrew Kenneth Milton" <akm@theinternet.com.au> wrote:
+-------[ Tony McDonald ]---------------------- | | Sorry, should have been more specific. The images are not showing up. If I | select the image URL and enter it into the address bar, I get a Pike error;
When all else fails, brute force and ignorance prevail.
MATCH ^([a-z]*)$ CALL http://127.0.0.1:8080\1 RXML MATCH ^([A-Z]*)$ CALL http://127.0.0.1:8080\1 RXML MATCH ^([0-9]*)$ CALL http://127.0.0.1:8080\1 RXML MATCH ^/$ http://127.0.0.1:8080/ RXML
substitute your URL obviously d;)
Many thanks to Andrew for all his help - I'd have got nowhere otherwise; Ok, here's as far as I got, as a couple of people (Phil, Magnus) were keen to see how I got on and I'm running out of steam on this for now ;) This set of rules almost works (warning - these 5 lines have wrapped). LOCATION /internal-roxen-unit CALL / RAW MATCH ^/([A-Z])(.*)$ CALL http://localhost:12345/VirtualHostBase/http/localhost:8888/VirtualHostRoot/\ 1\2 RXML MATCH ^/([a-z])(.*)$ CALL http://localhost:12345/VirtualHostBase/http/localhost:8888/VirtualHostRoot/\ 1\2 RXML MATCH ^/([0-9])(.*)$ CALL http://localhost:12345/VirtualHostBase/http/localhost:8888/VirtualHostRoot/\ 1\2 RXML MATCH ^/$ http://localhost:12345/VirtualHostBase/http/localhost:8888/VirtualHostRoot/i ndex_html RXML The roxen server is listening on port 8888, whilst ZServer is on 12345. I know these rules are more complex than they need to be, but they do work - of a sorts. Images from /_internal/ are forwarded through, so you do see images from gtext, tablist and atlas for example. This is pretty neat. Other Roxen tags are rendered too. One very useful one is the tablify tag that renders nice tables around data dumps. The bad news is that /internal-roxen-unit doesn't get through, so tags such as obox (which uses the single pixel gif that is basically what /internal-roxen-unit is) don't render correctly. That's ok though, you can create a single pixel gif called internal-roxen-unit at the root zope level and get around it that way). The really bad news is that the manage and manage_main authentication just will not work. Nothing I've tried will allow an authentication dialog to pop up - you just get the SiteError:Unauthorized error with the usual traceback <!-- Traceback (innermost last): File /home/zope/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py, line 223, in publish_module File /home/zope/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py, line 187, in publish File /home/zope/Zope-2.4.1-src/lib/python/ZPublisher/Publish.py, line 162, in publish File /home/zope/Zope-2.4.1-src/lib/python/ZPublisher/BaseRequest.py, line 463, in traverse File /home/zope/Zope-2.4.1-src/lib/python/ZPublisher/HTTPResponse.py, line 581, in unauthorized Unauthorized: (see above) --> The HTTP Relay module in Roxen allows for headers to be passed through to the server (by adding RAW after RXML above) and this is *supposed* to pass through all headers. The browser never gets the data however, and you just watch the ie logo spin (tried with Mozilla too - same response). I tried TRIMHEADERS, CACHE and STREAM as well - no joy. That¹s it, I'm stuck now. Anyone else want to take this on for a while? :) Tone. -- Dr Tony McDonald, Assistant Director, FMCC, http://www.fmcc.org.uk/ The Medical School, Newcastle University Tel: +44 191 243 6140 A Zope list for UK HE/FE http://www.fmcc.org.uk/mailman/listinfo/zope
| Sorry, should have been more specific. The images are not showing up. If I | select the image URL and enter it into the address bar, I get a Pike error;
When all else fails, brute force and ignorance prevail.
MATCH ^([a-z]*)$ CALL http://127.0.0.1:8080\1 RXML MATCH ^([A-Z]*)$ CALL http://127.0.0.1:8080\1 RXML MATCH ^([0-9]*)$ CALL http://127.0.0.1:8080\1 RXML MATCH ^/$ http://127.0.0.1:8080/ RXML
substitute your URL obviously d;) Many thanks to Andrew for all his help - I'd have got nowhere otherwise;
Ok, here's as far as I got, as a couple of people (Phil, Magnus) were keen to see how I got on and I'm running out of steam on this for now ;)
This set of rules almost works (warning - these 5 lines have wrapped).
LOCATION /internal-roxen-unit CALL / RAW MATCH ^/([A-Z])(.*)$ CALL
http://localhost:12345/VirtualHostBase/http/localhost:8888/VirtualHost Root/\
1\2 RXML MATCH ^/([a-z])(.*)$ CALL
http://localhost:12345/VirtualHostBase/http/localhost:8888/VirtualHost Root/\
1\2 RXML MATCH ^/([0-9])(.*)$ CALL
http://localhost:12345/VirtualHostBase/http/localhost:8888/VirtualHost Root/\
1\2 RXML MATCH ^/$
http://localhost:12345/VirtualHostBase/http/localhost:8888/VirtualHost Root/i
ndex_html RXML
This is what I've got: LOCATION /_internal/ CALL /_internal/ MATCH ^(.*)$ CALL http://localhost:8080/VirtualHostBase/http/golf.python.mine.nu:81/golf .python.mine.nu/VirtualHostRoot/\1 RXML This does work, except for gtext, gbutton etc. that uses _internal_ Using this on the other hand; MATCH /foobar/(.*)$ CALL http://localhost:8080/VirtualHostBase/http/golf.python.mine.nu:81/golf .python.mine.nu/foobar/VirtualHostRoot/\1 RXML and everything inside the foobar zope folder + gtext etc works. Seems to me as if "LOCATION /_internal/ CALL /_internal/" is broken. It gives the same traceback as Tony sent in this thread a while ago. Can one write a regexp matching anything but urls starting with "_" ? -- /Magnus Heino
+-------[ Magnus Heino ]---------------------- | | Can one write a regexp matching anything but urls starting with "_" ? Normally ^([^_].*)$ would match, however, Roxen doesn't seem to like that, I'm guessing its REGEXPS are not really REGEXPS, but extended globbing, which seems a little weird. -- Totally Holistic Enterprises Internet| | Andrew Milton The Internet (Aust) Pty Ltd | | ACN: 082 081 472 ABN: 83 082 081 472 | M:+61 416 022 411 | Carpe Daemon PO Box 837 Indooroopilly QLD 4068 |akm@theinternet.com.au|
| Can one write a regexp matching anything but urls starting with "_" ?
Normally ^([^_].*)$ would match, however, Roxen doesn't seem to like that, I'm guessing its REGEXPS are not really REGEXPS, but extended globbing, which seems a little weird.
Is anyone of you subscribed to the roxen mailinglist? -- /Magnus Heino
It's making references to /_internal/ and this makes the graphics somewhat ... Less than useful! :) (for the Roxen-challenged this is an internal filesystem of images - they obviously don't exist in the Zope site).
Oh 'eck, we're into regexp space now....
^([A-Za-z0-9].*) does not work. Any regexp guru want to give me a clue?
Try: http://www.zope.org/Members/Bill/Documentation/RoxenZope and http://www.zope.org/Members/Bill/Documentation/ZopeandRoxen2
On 28/9/01 6:19 pm, "Bill Anderson" <bill@immosys.com> wrote:
It's making references to /_internal/ and this makes the graphics somewhat ... Less than useful! :) (for the Roxen-challenged this is an internal filesystem of images - they obviously don't exist in the Zope site).
Oh 'eck, we're into regexp space now....
^([A-Za-z0-9].*) does not work. Any regexp guru want to give me a clue?
Try:
http://www.zope.org/Members/Bill/Documentation/RoxenZope and http://www.zope.org/Members/Bill/Documentation/ZopeandRoxen2
Thanks for that Bill, but I'm trying to avoid the Zope.cgi route - I want to use the VHM method of serving from a Roxen server. I feel that the Zope.cgi method isn't as efficient as ZServer/Apache | Roxen integration. Thanks, tone -- Dr Tony McDonald, Assistant Director, FMCC, http://www.fmcc.org.uk/ The Medical School, Newcastle University Tel: +44 191 243 6140 A Zope list for UK HE/FE http://www.fmcc.org.uk/mailman/listinfo/zope
On Sat, Sep 29, 2001 at 01:20:45PM +0100, Tony McDonald wrote:
Thanks for that Bill, but I'm trying to avoid the Zope.cgi route - I want to use the VHM method of serving from a Roxen server.
I feel that the Zope.cgi method isn't as efficient as ZServer/Apache | Roxen integration.
It seems you missed the point. Zope.cgi is justa away to pass information from a web server to Zope. VHM is a way to process this information an d implement virtual hosts. These tools are completely orthogonal, you can use one of them or both, or none at all. Oleg. ---- Oleg Broytmann http://www.zope.org/Members/phd/ phd@phd.pp.ru Programmers don't die, they just GOSUB without RETURN.
On Sat, 2001-09-29 at 06:20, Tony McDonald wrote: ...
Thanks for that Bill, but I'm trying to avoid the Zope.cgi route - I want to use the VHM method of serving from a Roxen server.
I feel that the Zope.cgi method isn't as efficient as ZServer/Apache | Roxen integration.
Would not the regex be the same though?
On 1/10/01 3:38 pm, "Bill Anderson" <bill@immosys.com> wrote:
On Sat, 2001-09-29 at 06:20, Tony McDonald wrote: ...
Thanks for that Bill, but I'm trying to avoid the Zope.cgi route - I want to use the VHM method of serving from a Roxen server.
I feel that the Zope.cgi method isn't as efficient as ZServer/Apache | Roxen integration.
Would not the regex be the same though?
That's what I thought, the regex I used has the same format as the one in your HowTo, ie MATCH ^/([A-Z])(.*)$ CALL http://localhost:12345/VirtualHostBase/http/localhost:8888/VirtualHostRoot/\ 1\2 RXML But the thing is 1) /internal-roxen-unit urls *don't* get through to Roxen (even with the LOCATION setup - Magnus seems to think it's broken). I can live with this though (single pixel gif in root folder solution) 2) authentication information is not getting through to Zope. This I can't live with, and no combination of flags I used seemed to make a difference :( As Andrew says, it seems the Roxen regexp is doing extended globbing, ie not real regex at all :( Like I said, so near yet so far... Tone. -- Dr Tony McDonald, Assistant Director, FMCC, http://www.fmcc.org.uk/ The Medical School, Newcastle University Tel: +44 191 243 6140 A Zope list for UK HE/FE http://www.fmcc.org.uk/mailman/listinfo/zope
On Mon, 2001-10-01 at 09:33, Tony McDonald wrote:
On 1/10/01 3:38 pm, "Bill Anderson" <bill@immosys.com> wrote:
On Sat, 2001-09-29 at 06:20, Tony McDonald wrote: ...
Thanks for that Bill, but I'm trying to avoid the Zope.cgi route - I want to use the VHM method of serving from a Roxen server.
I feel that the Zope.cgi method isn't as efficient as ZServer/Apache | Roxen integration.
Would not the regex be the same though?
That's what I thought, the regex I used has the same format as the one in your HowTo, ie
MATCH ^/([A-Z])(.*)$ CALL http://localhost:12345/VirtualHostBase/http/localhost:8888/VirtualHostRoot/\ 1\2 RXML
But the thing is 1) /internal-roxen-unit urls *don't* get through to Roxen (even with the LOCATION setup - Magnus seems to think it's broken). I can live with this though (single pixel gif in root folder solution) 2) authentication information is not getting through to Zope. This I can't live with, and no combination of flags I used seemed to make a difference :(
As Andrew says, it seems the Roxen regexp is doing extended globbing, ie not real regex at all :(
Wouldn't suprise me. note that in one of the configs I tried, you had to specifically reroute the roxen urls to themselves ... before the zope routing (it is in the alternate section). have you tried that?
Like I said, so near yet so far...
I know the feeling ... Bill
Finally i was told by the roxen team, that you have to change line 305 in modules/proxies/relay2.pike #if 1 has to be #if 0 to always use synchronous connections (there seems to be a problem with async) i don't know how this is like with older versions of roxen (i use 2.2).. So.. roxen can use virtual host monster :) -- Best Regards, Justin
participants (6)
-
Andrew Kenneth Milton -
Bill Anderson -
Justin Heesemann -
Magnus Heino -
Oleg Broytmann -
Tony McDonald