[IPOL discuss] running the demo server behind a reverse proxy

Juan Cardelino juanc at fing.edu.uy
Wed Mar 16 07:08:21 CET 2011


It is all cristal clear now. Thanks Nicolas! And sorry to bother you
in these times, I didn't connect both things.


On Wed, Mar 16, 2011 at 2:56 AM, Nicolas Limare
<nicolas.limare at cmla.ens-cachan.fr> wrote:
> Hi,
>
>> 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
>
> Yes, I'm late. I've been busy recently writing the first article
> *about* IPOL (soon available, I'll let you know). Now the next task in
> my todolist is the availability of this demo/developemnt server for
> everyone. Unfortunately, it's quite difficult to focus on work lately
> in Japan (don't worry, I'm not exposed).
>
>> The problem is (there's always a problem, right?) that this server
>> runs behind a reverse proxy.
>
> No problem with proxies, the ipol demos on http://demotest.ipol.im are
> behind a reverse proxy (nginx) and the "official ones" on
> http://www.ipol.im/pub/demo/ are behind two chained proxies (apache
> mod_proxy and nginx). And I recommend to use a proxy when the demo
> system is exposed on the web because it will act as a secutity filter
> and handle the load.
>
>> 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'
>
> server.socket_host and server.socket_port only indicate which network
> IP and port the demo should listen on. To customize the URLs when
> behind a proxy, remove your "fast hacks" and add these settings:
>
>    tools.proxy.on = True
>    tools.proxy.base = 'ihttp://ie.fing.edu.uy/ipol/'
>    tools.proxy.local = ''
>
> More doc on the cherrypy site:
>    http://www.cherrypy.org/wiki/BuiltinTools#tools.proxy
>
> It should fix all your problems. Let me know if there are some other
> problems.
> The only abslolute links will be the ones at the top of the page (ipol
> ...). There should be a possibility to customize this part of the
> templates, but I didn't feel this required immediate work. Feel free
> to propose your solutions.
>
>> 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.
>
> This is not possible. the demo system doesn't provide some files that
> can be distributed by another server (a la ~/public_html/), it is a
> software that can be used as a stand-alone web server (directly on
> line or behind a proxy), or plugged in another web service system
> (CGI, fastCGI, WSGI, ...).
>
> Best,
>
> --
> Nicolas LIMARE - CMLA - ENS Cachan    http://www.cmla.ens-cachan.fr/~limare/
> IPOL - image processing on line                          http://www.ipol.im/
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAk2AURMACgkQvviFAPpCP086cQCfZxSq7u5wbtgHMGDr9+JOb0xS
> HK0AoJxKkt+qSHO56P/N7SF9GrPt70W+
> =9zsZ
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> discuss mailing list
> discuss at list.ipol.im
> http://tools.ipol.im/mailman/listinfo/discuss
>



More information about the discuss mailing list