From: Dan C. P. <dp...@ml...> - 2004-07-09 13:50:10
|
Leendert, You could just proxy through the extras folder via a rewrite rule. Then apache sits on the frontend with thttpd sitting behind serving the static stuff. That may seem pointless at first look because you're using the heavy apache interpreter as a proxy for the lightweight thttpd (is that a kernel-level httpd daemon?). However, as I understand it apache is an extremely efficient proxy server. The big efficiency you'll miss using apache as a proxy is the "lingering socket" problems associated with users on slower connections (the slower the download, the longer a user ties a heavy mod_perl process up), but the "negotiate/read/serve" part will be handled mostly by thttpd. It'd probably make more sense to come at this from the other direction, though. Put thttpd in front of your apache/mod_perl process and then have it handle everything under /extras/ and /uploads/ (though what'll that do for security?) and proxy everything else through to your mod_perl process. I assume thttpd supports this kind of setup, otherwise you can just use a lightweight apache interpreter without mod_perl for the frontend. I've set up a couple systems like this in the past, with a "lightweight" apache interpreter serving static content in front and a heavier mod_perl interpreter in back serving mod_perl stuff. It's not hard. I can help you with the rewrite/proxy stuff if you want. -DJCP On Fri, 2004-07-09 at 09:21, Leendert Bottelberghs wrote: > I'm currently experimenting with setting up WebGUI to run on two > different http servers. I use an Apache/mod_perl server for the > dynamic content (generating the pages), and thttpd (a forth-generation > Non-blocking I/O server) for serving all static content (uploads and > extras). > I was very pleased with the way WebGUI supports the configuration of > the extras and uploads URL, this makes setting up a config like mine > quite easy. > I encountered a problem though with some of the javascript that is in > the extras directory and is used in functionality such as the HTML > editors. The extras-url must be different from the site-url because it > is served by a different http-server. It's also possible to use the > same url, but on a different port. This results in the HTML-editor > javascript to be served from a different domain than the website in > which the edit form is present. This causes a javascript security > exception, so the editor will NOT work. > > To conclude: as long as the default javascripts that come with WebGUI > are approached from the extrasURL that is configured in the > config-file, you can't serve the extras folder from another server. > Solution: seperate the javascript that comes with WebGUI and put them > in a javascript folder that can be configured seperately from the > extras-folder and -url. It won't be a bad idea at all to join all > javascript into one folder, aside from the reasons mentioned before. > > JT, what do you say about this? > > -leendert -- *-._.-*^*-._.-*^*-._.-*^*-._.-*^*-._.-*^*-._.-*^*-._.-*^*-._.-* Daniel Collis Puro CTO and Lead Developer, MassLegalServices.org Massachusetts Law Reform Institute 99 Chauncy St., Suite 500 Boston, MA 02111 617-357-0019 ext. 342 dp...@ml... http://www.masslegalservices.org |