[IPOL discuss] running the demo server behind a reverse proxy
Juan Cardelino
juan.cardelino at gmail.com
Tue Mar 15 16:36:38 CET 2011
Dear all (but particulary Nicolas),
I'm assisting an author from my lab in the development of his
demo, this is the second time I'm doing this here in Montevideo. As
far as I know, we still lack ssh access to a development server, so
for the sake of simplicity I've installed an ipol server on one of our
development servers in our department. The point here is to have a
rapid development cycle on the demo and at the same time have the
possibility of running the demo online.
The problem is (there's always a problem, right?) that this server
runs behind a reverse proxy. The scenario is the following:
the main web server is iie.fing.edu.uy
the development server is rosaluna.fing.edu.uy (not accesible from outside)
the main web server redirects (apache's mod_proxy)
iie.fing.edu.uy/ipol to rosaluna.fing.edu.uy:8080
So far so god, I made it work, except from some links that are
generated in an absolute way by the demo code. The problem arises
because in class app we have the following code:
http.refresh(self.base_url + 'run?key=%s' % self.key)
the value of the self.base_url seems to be taken from the demo.conf
value of server.socket_host which in my case is server.socket_host =
'rosaluna.fing.edu.uy'
One fast hack was to define a new member variable
outside_url = 'http://iie.fing.edu.uy/ipol/psf_estim/' in the class
app of the current demo. This of course, if it is of interest, should
be possible to define in base_app class.
Even with this hack, some URLs were still absolute, so I tried a
different approach using mod_rewrite (i guess) and just replacing
every occurence of the internal URL by the external one.
That made it work, however, I'm still having some problems which I'm
not being able to diagnose. Take a look at
http://iie.fing.edu.uy/ipol/psf_estim/
you will see that sometimes (apparently random) the pages are
delivered blank. If you refresh the page or re-enter the same URL you
get the page correctly.
I'm sure it is a cache issue, but I'm not sure how to deal with it.
I'm not sure if the ability of running the ipol server behind a proxy
is of any use for us, so feel free to ignore this. Maybe it could
render useful in a future were we could have heavy traffic and we
could need load balancing or something. I don't really know.
What I would like is just to run a local copy of the server, if you
could point me to another solution (like running ipol in my home
directory on the main server) it would be appreciated.
Thanks in advance for your time.
Best regards,
Juan
More information about the discuss
mailing list