On 9/21/08, Gregor Ebersberg <[EMAIL PROTECTED]> wrote: > On Saturday 20 September 2008 06:47:14 pm [EMAIL PROTECTED] wrote: > > If using Jetty, the JETTY_PORT setting controls which port is used. > > The default is 8888 to avoid conflicts with standard Web servers (e.g. > > Apache httpd) on port 80 and Tomcat's default port 8080. Set > > JETTY_PORT=80 if Lenya is the only Web server to avoid URLs containing > > the port number. > I will try this, partly because it occurs to me that the lenya project could > use a simple stand alone out of the box working example. This would eliminate > my initial concerns that in order to just use lenya one needs to be capable > of configuring of at least the intercation Apache and Lenya (and I first > thought I would also need Tomcat which would make it a interaction of 3 > systems). Just using Lenya under Jetty would allow to tailor a working > example which would also encompass a working live site as the final output as > an example that also newbies like me would find convincing. Are there more > people on the list how would find this useful? > > In Lenya 1.2.5, the JETTY_PORT is set in lenya.sh. In earlier > > versions and in Lenya 2.x, JETTY_PORT is an environment variable, > > although it may still be overridden in lenya.sh. > > What benefits are you expecting from running Lenya in Tomcat? > If i could avoid it, I would first try without, as I'm clueless about Tomcat. > > > The > > primary benefit of Tomcat over Jetty is hot reloading of Java classes > > -- more useful for development than production. The other benefit is > > for businesses where adding a servlet to Tomcat is easier than adding > > a new program (usually due to lengthy approval processes rather than > > any technical issues.) Lenya in Tomcat shares the JVM with other > > applications, sometimes creating library conflicts (specifically > > Xalan.) > > > > We use Apache httpd on port 80 proxying to Lenya on another port > > firewalled from the Internet. For upgrades and new websites, we > > create new instances of Lenya, test, then just adjust the httpd > > configuration. We currently use virtual servers, but integrating > > Lenya pages using the URL path would be almost as easy. One advantage > > is we remove the publication name from external URLs. > > That sounds both impressive and very handy! > Best, > Gregor
Most devs like Tomcat reloading Java classes without restarting Lenya while developing. I develop using Jetty, and am constantly restarting Lenya. For production. Jetty is easier than Tomcat for maintenance: - easier multiple instances of Lenya. - separate configuration of each instance. - easier configuration of the proxy since each instance uses a different port. - each Lenya instance in a separate JVM. The MLs contain debates whether this is better or worse for process and memory management, but it definitely avoids Java class conflicts. - less technology (since you do not need to install/configure/use Tomcat.) I was surprised you felt Tomcat was necessary. The installation instructions at: http://lenya.apache.org/docu20/installation20/install20.html explain the standalone implementation first. What caused you to think that Tomcat was needed? We are always seeking to improve the documentation. Should we add a line stating, "We recommend the Jetty standalone installation for beginners."? --- The following is provided more to explain possibilities with Lenya than suggest this is the best implementation. Below is an excerpt from our Apache httpd configuration for proxying to Lenya 1.2. We only use Kupu for editing so more might be needed for other editors. Lenya 2.x would require testing and probably many changes. ProxyPassReverseCookieDomain requires at least Apache httpd 2.1. Our implementation requires login to the main website (www.example.com) before entering edit mode (on edit.example.com). Accessing the edit server without logging in returns a blank page. The main website has "edit" links when a visitor has the rights to edit a page. The session Cookies are at the domain level so sessions work for both server names. The default domain server name (http://example.com) would not work as the Cookies would not be shared. (We Redirect the default domain server name to add "www.".) The Publication name is removed from URLs. The only clues that the website is running Lenya are: - the META Generator Header. (Our goal was not to hide that we are using Lenya, just have concise URLs.) - the language (e.g. "_en") in every page name. - the "lenya.usecase" querystring parameter in the Register/Login, Contact, Sitemap, and Search URLs. (Lenya 2 uses similar syntax for "lenya.module". My development version does not require the querystring for basic functionality.) <VirtualHost *> ServerName edit.example.com RewriteEngine On RewriteRule ^/$ http://127.0.0.1:8888/myPublication/authoring/$1 [P] RewriteRule ^/images/(.*)$ http://127.0.0.1:8888/myPublication/authoring/images/$1 [P] RewriteRule ^/css/(.*)$ http://127.0.0.1:8888/myPublication/authoring/css/$1 [P] RewriteRule ^/(.*)$ http://127.0.0.1:8888/$1 [P] ProxyPassReverseCookieDomain 127.0.0.1 example.com ProxyPassReverse / http://127.0.0.1:8888/ </VirtualHost> <VirtualHost *> ServerName www.example.com RewriteEngine On RewriteRule ^/edit.example.com/(.*)$ /$1 RewriteRule ^/myPublication/live/(.*)$ http://127.0.0.1:8888/myPublication/live/$1 [P] RewriteRule ^/myPublication/authoring/(.*)$ http://127.0.0.1:8888/myPublication/live/$1 [P] RewriteRule ^/lenya/(.*)$ http://127.0.0.1:8888/lenya/$1 [P] RewriteRule ^/kupu/(.*)$ http://127.0.0.1:8888/kupu/$1 [P] RewriteRule ^/(.*)$ http://127.0.0.1:8888/myPublication/live/$1 [P] ProxyMaxForwards 2 ProxyPassReverseCookieDomain 127.0.0.1 example.com ProxyPassReverse / http://127.0.0.1:8888/myPublication/live/ </VirtualHost> HTH, solprovider --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
