User talk:Andy

From NAMIC Wiki
Revision as of 13:23, 18 December 2006 by Andy (talk | contribs) (Update from Wiki)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home < User talk:Andy

Dart Proxy

I did add logic to the main dashboard such that if no submission has coverage or dynamic analysis, those "tracks" are not shown. (Coverage and DynamicAnalysis are not real tracks in the system, they are simply tests).

I just tried connecting Dart2 to Apache. The web page describes (part of) what is necessary.

http://jetty.mortbay.org/jetty/faq?s=200-General&t=apache

On my system, I did the following:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule rewrite_module modules/mod_rewrite.so
#AddModule mod_rewrite.c
 #AddModule mod_proxy.c
 
ProxyPass / http://localhost:8081/
ProxyPassReverse / http://localhost:8081/

This ends up mapping urls at "/" that apache receives to the Dart server running on port 8081. (The AddModule lines are commented out because I can't seem to access that method on the Win32 version of apache). This maps urls

http://www.itk.org/Insight to http://www.itk.org:8081/Insight

(all Dart server projects would reside under / on the apache server.)

This would be a reasonable configuration if all you wanted to do was use Apache for access control or something like that (if I can ever figure it out, Dart will support users and roles).

But I imagine what you really want to do is run Dart through a restricted access point in the url space of the Apache server, i.e. map urls like http://www.itk.org/Dart/Insight to the Dart server (with project Insight). Here the /Dart/ section of the address space would trigger the proxy delegation.

ProxyPass /Dart/ http://localhost:8081/
ProxyPassReverse /Dart/ http://localhost:8081/

This will map urls

http://www.itk.org/Dart/Insight to http://www.itk.org:8081/Insight

(all Dart server projects would reside under /Dart/ on the apache server.)

With this you can get to all the Dart pages. However, the resources (icons, images, style sheets) are not found because they are specified in the html pages served to be at /Insight instead of at /Dart/Insight. So the web browser gets a url for a resource that it needs to fetch (at /Insight/Resources) but no such url exists on the apache server.

I think we need use mod_rewrite to fix this problem, basically establishing a rewrite rule so that requests that are not found at /Insight/Resources get redirected to the Dart server.

RewriteEngine on
RewriteRule ^/TestProject/(.*)$ http://localhost:8081/TestProject/$1 [P]

You'll need one of these RewriteRule lines for each hosted project (and maybe even the the Dart server itself).

(From Jim)