[Using Sakai] sakai behind a reverse proxy discussed at apache group request not reaching sakai server

Tapas Mishra mightydreams at gmail.com
Thu Jul 8 04:49:31 PDT 2010


The situation is on LAN we are able to access sakai as
http://192.168.1.5:9090/portal

so images and css for above if some one requests in browser
http://192.168.1.5:9090/portal
are served as

GET http://192.168.1.5:9090/library/image/sakai_powered.gif

note /library instead of /portal/library i.e. some URLs are generated
at / and not at /portal

which is what we Reverse Rroxied to from internet.
as
Proxy /sakai  http://192.168.1.5:9090/portal
ProxyPassReverse /sakai  http://192.168.1.5:9090/portal


so if some one tries to access our  sakai setup as
http://mydomain.com/sakai
then internally Apache redirects it to

http://192.168.1.5:9090/portal

but in browser what is happening some of the CSS and Javascripts which
are not generated at

/portal
and generated at / on the server where sakai is
are not able to reach the sakai server
the request goes as

http://mydomain.com/library/skin/default/images/logo_inst.gif

which then tries to serve from document root of my Front end
server.Where it obviously is not present.

We want the request to reach as

http://mydomain.com/sakai/library/skin/default/images/logo_inst.gif

where /sakai is Proxied to http://192.168.1.5:9090/portal
and all the internal IP http://192.168.1.5:9090/portal
being hidden from the user on internet.


I am forwarding a message I got on Apache users group which is
official support group for Apache.
We investigated the headers client browser on internet got when they
tried to reach sakai

and finally reached the conclusion that a few things might need to be
defined correctly.

Please see this link for complete discussion
http://www.spinics.net/lists/apache-users/msg95595.html

specially this reply
http://www.spinics.net/lists/apache-users/msg95596.html


I am posting a summary here


sakai is generating URLs like this:

GET /library/skin/default/portal.css
GET /portal/styles/portalstyles.css
GET /library/js/jquery.js

mod_proxy does not rewrite HTML, only a few specific headers, so
sakai must generate the correct URLs, eg
/'sakai/styles/portalstyles.css'.


Here are the headers

from a client browser on internet following headers were recieved

http://pastebin.com/k54kDYAB

where as on LAN while accessing via IP:9080/portal the following
headers were recieved
http://pastebin.com/0BaEViH4



What can I do so that the sakai server is hidden from internet and I
reach sakai via Apache front  end in this situation.
Or any other ideas as how you people are doing?

-- 
Tapas
http://mightydreams.blogspot.com
http://wiki.xensource.com/xenwiki/Xen_on_4_app_servers


More information about the sakai-user mailing list