Re: mod_jk configuration
Bruno, > when I try > http://localhost/jsp-examples http://localhost/jsp-examples (without the /) > I get this error: > > Forbidden > You don't have permission to access /jsp-examples on this server. > Additionally, a 403 Forbidden error was encountered while trying to use an > ErrorDocument to handle the request. It looks like you have Indexes turned off for this directory/location in httpd.conf, or you don't have an index.html (or whatever) file there to display. In that case, it's not surprising that Apache httpd is generating this error (note that it's httpd, not Tomcat, that is generating the error). If you want Tomcat to respond to requests for the URI with no trailing slash, you'll have to map that explicitly. > Here's my jk.conf (/etc/apache2/conf.d/jk.conf): > > http://www.nabble.com/file/3907/jk.conf jk.conf I'm guessing that was a copy/paste error. Let me guess what you have in jk.conf: JkMount /jsp-examples/* worker1 and/or JkMount /jsp-examples/*.jsp worker1 Since "/jsp-examples" does not match "/jsp-examples/*", your mappings are failing. You'll need to add something like: JkMount /jsp-examples worker1 Hope that helps, -chris signature.asc Description: OpenPGP digital signature
Re: mod_jk configuration
Hi, Christopher Schultz wrote: Bruno, when I try http://localhost/jsp-examples http://localhost/jsp-examples (without the /) I get this error: Forbidden You don't have permission to access /jsp-examples on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. That happened to me once and the problem was in Apache's configuration. I had to specify a for jsp-examples and set the correct permissions with AllowOverride. It looks like you have Indexes turned off for this directory/location in httpd.conf, or you don't have an index.html (or whatever) file there to display. In that case, it's not surprising that Apache httpd is generating this error (note that it's httpd, not Tomcat, that is generating the error). If you want Tomcat to respond to requests for the URI with no trailing slash, you'll have to map that explicitly. Here's my jk.conf (/etc/apache2/conf.d/jk.conf): http://www.nabble.com/file/3907/jk.conf jk.conf I'm guessing that was a copy/paste error. Let me guess what you have in jk.conf: JkMount /jsp-examples/* worker1 and/or JkMount /jsp-examples/*.jsp worker1 Since "/jsp-examples" does not match "/jsp-examples/*", your mappings are failing. You'll need to add something like: JkMount /jsp-examples worker1 Hope that helps, -chris Hope this helps, if you need the specific lines in Apache tell me and I'll send them. -- Jorge Cabrera Consultor técnico Ándago Ingeniería - www.andago.com Teléfono: +34 912 732 228 Móvil: +34 637 741 034 e-mail: [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Well I've tried adding DirectoryIndex index.html index.htm index.jsp but no good... My Apache configuration has this and all the links work with or without the / Does jk.cong overrides my apache conf? Christopher Schultz-2 wrote: > > Bruno, > >> when I try >> http://localhost/jsp-examples http://localhost/jsp-examples (without the >> /) >> I get this error: >> >> Forbidden >> You don't have permission to access /jsp-examples on this server. >> Additionally, a 403 Forbidden error was encountered while trying to use >> an >> ErrorDocument to handle the request. > > It looks like you have Indexes turned off for this directory/location in > httpd.conf, or you don't have an index.html (or whatever) file there to > display. > > In that case, it's not surprising that Apache httpd is generating this > error (note that it's httpd, not Tomcat, that is generating the error). > > If you want Tomcat to respond to requests for the URI with no trailing > slash, you'll have to map that explicitly. > >> Here's my jk.conf (/etc/apache2/conf.d/jk.conf): >> >> http://www.nabble.com/file/3907/jk.conf jk.conf > > I'm guessing that was a copy/paste error. Let me guess what you have in > jk.conf: > > JkMount /jsp-examples/* worker1 > and/or > JkMount /jsp-examples/*.jsp worker1 > > Since "/jsp-examples" does not match "/jsp-examples/*", your mappings > are failing. You'll need to add something like: > > JkMount /jsp-examples worker1 > > Hope that helps, > -chris > > > > -- View this message in context: http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7076449 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Well I would appreciated... Jorge Cabrera wrote: > > Hi, > > Christopher Schultz wrote: >> Bruno, >> >> >>> when I try >>> http://localhost/jsp-examples http://localhost/jsp-examples (without >>> the /) >>> I get this error: >>> >>> Forbidden >>> You don't have permission to access /jsp-examples on this server. >>> Additionally, a 403 Forbidden error was encountered while trying to use >>> an >>> ErrorDocument to handle the request. >>> > That happened to me once and the problem was in Apache's configuration. > I had to specify a for jsp-examples and set the correct > permissions with AllowOverride. >> >> It looks like you have Indexes turned off for this directory/location in >> httpd.conf, or you don't have an index.html (or whatever) file there to >> display. >> >> In that case, it's not surprising that Apache httpd is generating this >> error (note that it's httpd, not Tomcat, that is generating the error). >> >> If you want Tomcat to respond to requests for the URI with no trailing >> slash, you'll have to map that explicitly. >> >> >>> Here's my jk.conf (/etc/apache2/conf.d/jk.conf): >>> >>> http://www.nabble.com/file/3907/jk.conf jk.conf >>> >> >> I'm guessing that was a copy/paste error. Let me guess what you have in >> jk.conf: >> >> JkMount /jsp-examples/* worker1 >> and/or >> JkMount /jsp-examples/*.jsp worker1 >> >> Since "/jsp-examples" does not match "/jsp-examples/*", your mappings >> are failing. You'll need to add something like: >> >> JkMount /jsp-examples worker1 >> >> Hope that helps, >> -chris >> >> > Hope this helps, if you need the specific lines in Apache tell me and > I'll send them. > > -- > > Jorge Cabrera > Consultor técnico > Ándago Ingeniería - www.andago.com > > Teléfono: +34 912 732 228 > Móvil: +34 637 741 034 > e-mail: [EMAIL PROTECTED] > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7076457 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Bruno- box: login as root to the box tomcat: login with tomcat-user (such as admin or manager) that already has admin,manager privs M- This e-mail communication and any attachments may contain confidential and privileged information for the use of the designated recipients named above. If you are not the intended recipient, you are hereby notified that you have received this communication in error and that any review, disclosure, dissemination, distribution or copying of it or its contents - Original Message - From: "bcochofel" <[EMAIL PROTECTED]> To: Sent: Monday, October 30, 2006 10:19 AM Subject: Re: mod_jk configuration > > Well I've tried adding DirectoryIndex index.html index.htm index.jsp but no > good... > My Apache configuration has this and all the links work with or without the > / > Does jk.cong overrides my apache conf? > > > Christopher Schultz-2 wrote: >> >> Bruno, >> >>> when I try >>> http://localhost/jsp-examples http://localhost/jsp-examples (without the >>> /) >>> I get this error: >>> >>> Forbidden >>> You don't have permission to access /jsp-examples on this server. >>> Additionally, a 403 Forbidden error was encountered while trying to use >>> an >>> ErrorDocument to handle the request. >> >> It looks like you have Indexes turned off for this directory/location in >> httpd.conf, or you don't have an index.html (or whatever) file there to >> display. >> >> In that case, it's not surprising that Apache httpd is generating this >> error (note that it's httpd, not Tomcat, that is generating the error). >> >> If you want Tomcat to respond to requests for the URI with no trailing >> slash, you'll have to map that explicitly. >> >>> Here's my jk.conf (/etc/apache2/conf.d/jk.conf): >>> >>> http://www.nabble.com/file/3907/jk.conf jk.conf >> >> I'm guessing that was a copy/paste error. Let me guess what you have in >> jk.conf: >> >> JkMount /jsp-examples/* worker1 >> and/or >> JkMount /jsp-examples/*.jsp worker1 >> >> Since "/jsp-examples" does not match "/jsp-examples/*", your mappings >> are failing. You'll need to add something like: >> >> JkMount /jsp-examples worker1 >> >> Hope that helps, >> -chris >> >> >> >> > > -- > View this message in context: > http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7076449 > Sent from the Tomcat - User mailing list archive at Nabble.com. > > > - > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: mod_jk configuration
I had JkMount /jsp-examples worker1 and now the problem is gone... Thanks I have one more question, let's take /jsp-examples to explain... I want *.jsp send to tomcat for processing but all static contents processed by apache, how can I do this? Sorry for all the question but I'm new to all this tomcat configuration and I don't have much time to read all the docs... I need to get this to work by Wednesday... So, once more, thanks for the solutions... Christopher Schultz-2 wrote: > > Bruno, > >> when I try >> http://localhost/jsp-examples http://localhost/jsp-examples (without the >> /) >> I get this error: >> >> Forbidden >> You don't have permission to access /jsp-examples on this server. >> Additionally, a 403 Forbidden error was encountered while trying to use >> an >> ErrorDocument to handle the request. > > It looks like you have Indexes turned off for this directory/location in > httpd.conf, or you don't have an index.html (or whatever) file there to > display. > > In that case, it's not surprising that Apache httpd is generating this > error (note that it's httpd, not Tomcat, that is generating the error). > > If you want Tomcat to respond to requests for the URI with no trailing > slash, you'll have to map that explicitly. > >> Here's my jk.conf (/etc/apache2/conf.d/jk.conf): >> >> http://www.nabble.com/file/3907/jk.conf jk.conf > > I'm guessing that was a copy/paste error. Let me guess what you have in > jk.conf: > > JkMount /jsp-examples/* worker1 > and/or > JkMount /jsp-examples/*.jsp worker1 > > Since "/jsp-examples" does not match "/jsp-examples/*", your mappings > are failing. You'll need to add something like: > > JkMount /jsp-examples worker1 > > Hope that helps, > -chris > > > > -- View this message in context: http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7077657 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Bruno, > Well I've tried adding DirectoryIndex index.html index.htm index.jsp but no > good... Can you post the relevant portions of your httpd.conf? > Does jk.cong overrides my apache conf? jk.conf is just included in httpd.conf (right?), so it can certainly override your httpd.conf. -chris signature.asc Description: OpenPGP digital signature
Re: mod_jk configuration
Bruno, > I have one more question, let's take /jsp-examples to explain... > I want *.jsp send to tomcat for processing but all static contents processed > by apache, how can I do this? This should be the default. Anything for which you do not explicitly have a "JkMount" directive will be served by Apache httpd and not Tomcat. -chris signature.asc Description: OpenPGP digital signature
Re: mod_jk configuration
But when I use "JkMount /jsp-examples ajp13" doesn't this tell Apache that everything inside /jsp-examples "goes" to Tomcat? Christopher Schultz-2 wrote: > > Bruno, > >> I have one more question, let's take /jsp-examples to explain... >> I want *.jsp send to tomcat for processing but all static contents >> processed >> by apache, how can I do this? > > This should be the default. Anything for which you do not explicitly > have a "JkMount" directive will be served by Apache httpd and not Tomcat. > > -chris > > > > > -- View this message in context: http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7078655 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Bruno, > But when I use "JkMount /jsp-examples ajp13" doesn't this tell Apache that > everything inside /jsp-examples "goes" to Tomcat? No, it doesn't. JkMount does two kinds of matching: exact and wildcard. Exact: JkMount /jsp-examples ajp13 This will map the URI "/jsp-examples" to Tomcat, and NO OTHERS AT ALL. Wildcard: JkMount /jsp-examples/*.jsp ajp13 This will map any URI that looks like "/jsp-examples/ . .jsp". Note that the first example and the second example are completely separate. If you want Tomcat to handle "/jsp-examples" and everything inside that URI space, you need to do this: JkMount /jsp-examplesajp13 JkMount /jsp-examples/* ajp13 But, since you want Apache httpd to handle all the static content, you'll have to decide what Tomcat /should/ handle. I would usually have something like this for each of my webapps: JkMount /webappName/*.jsp ajp13 JkMount /webappName/j_security_check ajp13 This covers all JSPs as well as the built-in J2EE authentication system supported by Tomcat. If you have other URIs as well, then you should define them. There's nothing wrong with having a lot of JkMount directives: JkMount /webappName/servlet/* ajp13 JkMount /webappName/some/specific/servlet ajp13 JkMount /webappName/another/servlet/name ajp13 . . . Just list everything that you want Tomcat to handle, and everything else will be served by Apache httpd. -chris signature.asc Description: OpenPGP digital signature
Re: mod_jk configuration
Well I tried that but no good... I'vre tried this and still nothing: # The following line makes apache aware of the location of # the /jsp-examples context Alias /jsp-examples "/srv/www/tomcat5/base/webapps/jsp-examples" Options Indexes FollowSymLinks AllowOverride AuthConfig DirectoryIndex index.html index.htm index.jsp Order allow,deny Allow from all # Mount 'jsp-examples' directory inside webapps #JkMount /jsp-examples/* ajp13 #JkMount /jsp-examples ajp13 JkMount /jsp-examples/*.jsp ajp13 JkMount /jsp-examples/j_security_check ajp13 I guess I have to tell tomcat to process all the things for now... Christopher Schultz-2 wrote: > > > But, since you want Apache httpd to handle all the static content, > you'll have to decide what Tomcat /should/ handle. I would usually have > something like this for each of my webapps: > > JkMount /webappName/*.jsp ajp13 > JkMount /webappName/j_security_check ajp13 > > This covers all JSPs as well as the built-in J2EE authentication system > supported by Tomcat. If you have other URIs as well, then you should > define them. There's nothing wrong with having a lot of JkMount > directives: > -- View this message in context: http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7079096 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Bruno, > Alias /jsp-examples "/srv/www/tomcat5/base/webapps/jsp-examples" > JkMount /jsp-examples/*.jsp ajp13 > JkMount /jsp-examples/j_security_check ajp13 These three ought to do the trick. Which files aren't being served by Apache httpd? Can you give an example of a URI that should map successfully to a file on the disk, but doesn't appear to do so? Can you confirm that it is Tomcat or httpd that can't find the file? -chris signature.asc Description: OpenPGP digital signature
Re: mod_jk configuration
Christopher Schultz-2 wrote: > > Bruno, > >> Alias /jsp-examples "/srv/www/tomcat5/base/webapps/jsp-examples" >> JkMount /jsp-examples/*.jsp ajp13 >> JkMount /jsp-examples/j_security_check ajp13 > > These three ought to do the trick. Which files aren't being served by > Apache httpd? > Well I add the line: JkMount /jsp-examples ajp13 I now I can get http://localhost/jsp-examples http://localhost/jsp-examples to work also... Thanks -- View this message in context: http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7091265 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Now I have an even stranger behavior... I can only JkMount /jsp-examples, I did the same to /tomcat-docs, /servlets-examples and /cocoon and I get : Forbidden You don't have permission to access /tomcat-docs/ on this server. Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request. Here's my /etc/apache2/conf.d/jk.conf: http://www.nabble.com/file/3921/jk.conf jk.conf My httpd.conf comes with SuSE and has several include options... -- View this message in context: http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7091397 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Bruno, > Now I have an even stranger behavior... > > I can only JkMount /jsp-examples, I did the same to /tomcat-docs, > /servlets-examples and /cocoon and I get : > > Forbidden > You don't have permission to access /tomcat-docs/ on this server. > Additionally, a 403 Forbidden error was encountered while trying to use an > ErrorDocument to handle the request. Tomcat is probably redirecting (302) "/tomcat-docs" to "/tomcat-docs/" (note the trailing slash). Then, Apache httpd gets the new request and refuses to serve it for whatever reason (probably a missing "Allow" directive). You probably need to have: JkMount /tomcat-docs ajp13 JkMount /tomcat-docs/ ajp13 > Here's my /etc/apache2/conf.d/jk.conf: > http://www.nabble.com/file/3921/jk.conf jk.conf (These are never coming through. How are you trying to attach files?) -chris signature.asc Description: OpenPGP digital signature
Re: mod_jk configuration
Christopher Schultz-2 wrote: > >> Here's my /etc/apache2/conf.d/jk.conf: >> http://www.nabble.com/file/3921/jk.conf jk.conf > > (These are never coming through. How are you trying to attach files?) > I'm using Upload File... option. Here's a copy/paste: # simple configuration for apache (for AJP connector, modul mod_jk.so) # workers file JkWorkersFile /etc/tomcat5/base/workers.properties # log file JkLogFile /usr/share/tomcat5/logs/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevelinfo # Select the log format JkLogStampFormat "[%a %b %d %H:%M:%S %Y] " # JkOptions indicate to send SSL KEY SIZE, JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories # JkRequestLogFormat set the request format JkRequestLogFormat "%w %V %T" ### servlets-examples Alias /servlets-examples "/srv/www/tomcat5/base/webapps/servlets-examples" JkMount /servlets-examples ajp13 JkMount /servlets-examples/* ajp13 #JkMount /servlets-examples/j_security_check ajp13 ### jps-examples ## Alias /jsp-examples "/srv/www/tomcat5/base/webapps/jsp-examples" JkMount /jsp-examples ajp13 JkMount /jsp-examples/*.jsp ajp13 JkMount /jsp-examples/j_security_check ajp13 ### cocoon Alias /cocoon "/srv/www/tomcat5/base/webapps/cocoon" JkMount /cocoon ajp13 JkMount /cocoon/* ajp13 #JkMount /cocoon/j_security_check ajp13 tomcat-docs ## Alias /tomcat-docs "/srv/www/tomcat5/base/webapps/tomcat-docs" JkMount /tomcat-docs ajp13 JkMount /tomcat-docs/* ajp13 #JkMount /tomcat-docs/j_security_check ajp13 security ## # The following line prohibits users from directly accessing WEB-INF AllowOverride None deny from all AllowOverride None deny from all -- View this message in context: http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7096982 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Bruno, bcochofel wrote: > Christopher Schultz-2 wrote: >>> Here's my /etc/apache2/conf.d/jk.conf: >>> http://www.nabble.com/file/3921/jk.conf jk.conf >> (These are never coming through. How are you trying to attach files?) >> > > I'm using Upload File... option. Hmm... I didn't know that one could "upload file" to an email... consider using copy/paste in the future. It seems to have worked, here. > ### jps-examples ## > Alias /jsp-examples "/srv/www/tomcat5/base/webapps/jsp-examples" > JkMount /jsp-examples ajp13 > JkMount /jsp-examples/*.jsp ajp13 > JkMount /jsp-examples/j_security_check ajp13 Note that the URI "/jsp-examples/" is not covered by these mappings. Apache httpd (and Tomcat) will do exactly what you ask of them, but no more. If the URI is off by a single character (in this case, a trailing '/'), then the request won't be forwarded to Tomcat. > ### cocoon > Alias /cocoon "/srv/www/tomcat5/base/webapps/cocoon" > JkMount /cocoon ajp13 > JkMount /cocoon/* ajp13 No, this one ought to work with a trailing /, since you have a mapping for "/cocoon/*". This includes "/cocoon/". You seem to be missing this mapping for the "jsp-examples" webapp, but the others have it. Just be careful about what you do and do not map. You can usually find the problem by reading your own configuration closely. Hope that helps, -chris signature.asc Description: OpenPGP digital signature
Re: mod_jk configuration
Christopher Schultz-2 wrote: > > Hmm... I didn't know that one could "upload file" to an email... > consider using copy/paste in the future. It seems to have worked, here. > I'm using www.nabble.com... Christopher Schultz-2 wrote: > >> ### jps-examples ## >> Alias /jsp-examples "/srv/www/tomcat5/base/webapps/jsp-examples" >> JkMount /jsp-examples ajp13 >> JkMount /jsp-examples/*.jsp ajp13 >> JkMount /jsp-examples/j_security_check ajp13 > > Note that the URI "/jsp-examples/" is not covered by these mappings. > Apache httpd (and Tomcat) will do exactly what you ask of them, but no > more. If the URI is off by a single character (in this case, a trailing > '/'), then the request won't be forwarded to Tomcat. > Well, this one works great, with or without the trailing "/"... Christopher Schultz-2 wrote: > >> ### cocoon >> Alias /cocoon "/srv/www/tomcat5/base/webapps/cocoon" >> JkMount /cocoon ajp13 >> JkMount /cocoon/* ajp13 > > No, this one ought to work with a trailing /, since you have a mapping > for "/cocoon/*". This includes "/cocoon/". > This one works and all the others but tomcat does the job for all the files (static content and all) What I wan't to do is let Apache serve static content and tomcat serve dynamic one... In the /jsp-examples everything works fine... I have images, index.html and I can run .jsp... This is the strange problem I've mentioned. -- View this message in context: http://www.nabble.com/mod_jk-configuration-tf2539505.html#a7098777 Sent from the Tomcat - User mailing list archive at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration
Bruno, >> Hmm... I didn't know that one could "upload file" to an email... >> consider using copy/paste in the future. It seems to have worked, here. > > I'm using www.nabble.com... Ah. I think the list will clip-out attachments. I'm not sure of the rules, but copy/paste pretty much always works. >>> JkMount /cocoon/* ajp13 > > This one works and all the others but tomcat does the job for all the files > (static content and all) That's because you said "anything that starts with "/cocoon/" should go to Tomcat. If you don't want Tomcat to serve those files, then don't use that kind of JkMount directive. > What I wan't to do is let Apache serve static content and tomcat serve > dynamic one... Apache httpd can only test based upon URI... it has no idea if a resource will be static or dynamic. You have to map your URIs appropriately. > In the /jsp-examples everything works fine... I have images, index.html and > I can run .jsp... > This is the strange problem I've mentioned. It's not strange at all: you told Tomcat to handle everything (for example) for "/cocoon/*". That's /everything/, regardless of it's static-ness. If you know that cocoon is required for 25 different URIs, then simply list them all. Or, if you know that cocoon only serves content for URIs more like this: /cocoon/a/b/c/*.html ...then only map that portion of the URI space into Tomcat. Apache httpd is doing /exactly/ what you've asked it to do. You just need to configure it to do what you want it to do. -chris signature.asc Description: OpenPGP digital signature
Re: mod_jk configuration issue
On 16 Jul 2008 at 13:41, Vinod Nagarajan wrote: Date sent: Wed, 16 Jul 2008 13:41:09 -0700 From: Vinod Nagarajan <[EMAIL PROTECTED]> Subject:mod_jk configuration issue To: users@tomcat.apache.org Send reply to: Tomcat Users List > Hi, > > I am kind of new to tomcat and apache. > > I have configured Apache2 ( on port 80) and Tomcat 6 (on port 8080) > on my > linux machine (ubuntu 8.04) and both work fine on its own. > > I am trying to get the Apache forward the jsp requests to tomcat and > get it > serviced by tomcat. > > I just went through the steps from the below link: > > http://tomcat.apache.org/tomcat-3.3-doc/mod_jk-howto.html#s72 > Those docs are ancient, they are for tomcat 3.3. Try using this: http://tomcat.apache.org/connectors-doc/generic_howto/quick.html and http://tomcat.apache.org/connectors-doc/ you will also need a jkmount for jsps like so: JkMount /*.jsp worker1 -Steve O. > The option to create the mod_jk.conf file by *starting the tomcat > with > jkconf option* doesn't work for me. > > It doesn't display anything in the error log. Can anyone help me get > through > this. > > Thanks, > Vinod > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: mod_jk configuration for production
What's your idea why you configured a socket timeout of 2? nuka schrieb: > Hello, > > I am facing to a problem concerning apache-tomcat configuration via mod_jk > for our production environment. We are using Apache: 2.0.55, Tomcat 5.0, > mod_jk 1.2.15. > > Our first problem has been raised some weeks ago when the clients received > http 404 errors. > > mod_jk logs have shown errors such as: > > [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1178): > Socket 14 is not connected any more (errno=-1) > [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1202): > Error sending request. Will try another pooled connection > [Tue Feb 13 08:36:03 2007][info] ajp_send_request::jk_ajp_common.c (1225): > All endpoints are disconnected or dead > [Tue Feb 13 08:36:03 2007][info] ajp_service::jk_ajp_common.c (1749): > Sending request to tomcat failed, recoverable operation attempt=1 > > After that, we changed the timeout for tomcat ajp connector (initially = > 1) to 6ms. > > Now we get other errors: > > - a lot of "Error decoding request" in the JBoss logs at the same times > where mod_jk is showing > > [Mon Feb 19 13:25:50 2007][info] > ajp_connection_tcp_get_message::jk_ajp_common.c (955): Tomcat has forced a > connection close for socket 14 > [Mon Feb 19 13:25:50 2007][error] ajp_get_reply::jk_ajp_common.c (1503): > Tomcat is down or refused connection. No response has been sent to the > client (yet) > [Mon Feb 19 13:25:50 2007][info] ajp_service::jk_ajp_common.c (1721): > Receiving from tomcat failed, recoverable operation attempt=0 > > Bellow is our configuration: > > > enableLookups="false" redirectPort="8443" debug="0" > protocol="AJP/1.3" connectionTimeout="6"/> > > workers.properties: > > # Define list of workers that will be used > # for mapping requests > worker.list=loadbalancer, loadbalancer2, status > > > worker.xxxNode1.port=8109 > worker.xxxNode1.host= > worker.xxxNode1.type=ajp13 > worker.xxxNode1.socket_keepalive=True > worker.xxxNode1.socket_timeout=2 > worker.xxxNode1.recycle_timeout=300 > worker.xxxNode1.recovery_options=0 > > worker.xxxNode2.port=8209 > worker.xxxNode2.host=xxx.xx.xx.xx > worker.xxxNode2.type=ajp13 > worker.xxxNode2.socket_keepalive=True > worker.xxxNode2.socket_timeout=2 > worker.xxxNode2.recycle_timeout=300 > worker.xxx2.recovery_options=0 > > Do you have any idea which parameters do we need to change in this > configuration? > > thanks > > rgds > > Nuka > - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk configuration directives in VirtualHost sections
I did mod_jk2 with Virtual Host, and while its not the same I think that doing VH will not be a problem once you get an idea of how it should/can be setup. THIS IS PSEUDO, DO NOT TAKE AS GOSPEL TRUTH !!! NO SUPPORT! :p -- workers.properties file -- # Setting Tomcat & Java Home workers.tomcat_home=/usr/local/tomcat55 workers.java_home=/usr/local/java ps=/ worker.list=host1 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 ps=/ worker.list=host2 worker.ajp13.port=9009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 ps=/ worker.list=host3 worker.ajp13.port=10009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 -- workers.properties file -- -- httpd.conf file -- ServerName host1:8009 DocumentRoot /usr/local/tomcat55/webapps/host1 DirectoryIndex index.html index.jsp ... LoadModule jk_module /usr/lib64/httpd/modules/mod_jk.so JkWorkersFile "/usr/local/tomcat55/conf/jk/host1-workers.properties" JkLogFile "/usr/local/tomcat55/logs/host1-mod_jk.log" JkLogLevel debug Alias / "/usr/local/tomcat55/webapps/host1" Options Indexes +FollowSymLinks JkMount /* host1 ... ServerName host1:9009 DocumentRoot /usr/local/tomcat55/webapps/host2 DirectoryIndex index.html index.jsp ... LoadModule jk_module /usr/lib64/httpd/modules/mod_jk.so JkWorkersFile "/usr/local/tomcat55/conf/jk/host2-workers.properties" JkLogFile "/usr/local/tomcat55/logs/host2-mod_jk.log" JkLogLevel debug Alias / "/usr/local/tomcat55/webapps/host2" Options Indexes +FollowSymLinks JkMount /* host2 ... -- httpd.conf file -- -- server.xml file -- ... -- server.xml file -- Try that and see how it works, again I did something similar with mod_jk2, I havent done this yet in mod_jk that is coming next. If you have different paths and arent putting the code in webapps, I currently have different paths for the different code, then the big change will be in the Server.xml where the appbase will need to be the full path to the code. Let me know if this works or if you did any tweeks. HTH Dan From: "Jonathan Woods" <[EMAIL PROTECTED]> Reply-To: "Tomcat Users List" To: Subject: mod_jk configuration directives in VirtualHost sections Date: Wed, 25 Jan 2006 21:55:55 - Hello, list. I have Apache 1.3.33 running on Linux and talking successfully to Tomcat 5.5.15 through mod_jk. I'd now like to host multiple instances of Tomcat (or maybe just multiple Tomcat connectors within one instance) to receive requests dispatched at multiple VirtualHosts on the same server. Is it possible to have more than one workers.properties file, and therefore more than one JkWorkersFile directive, per Apache? Ideally, I'd like one workers.properties file per VirtualHost just to make app-building easier. The documentation says that certain directives may be repeated in VirtualHost sections - e.g. JkLogFile - but doesn't mention JkWorkersFile. Thanks in advance - Jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: mod_jk configuration directives in VirtualHost sections
Dan - Thanks very much for all this - looks like it should work with mod_jk too! I'll let you know how I get on. Jon -Original Message- From: Didier McGillis [mailto:[EMAIL PROTECTED] Sent: 26 January 2006 19:32 To: users@tomcat.apache.org Subject: RE: mod_jk configuration directives in VirtualHost sections I did mod_jk2 with Virtual Host, and while its not the same I think that doing VH will not be a problem once you get an idea of how it should/can be setup. THIS IS PSEUDO, DO NOT TAKE AS GOSPEL TRUTH !!! NO SUPPORT! :p -- workers.properties file -- # Setting Tomcat & Java Home workers.tomcat_home=/usr/local/tomcat55 workers.java_home=/usr/local/java ps=/ worker.list=host1 worker.ajp13.port=8009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 ps=/ worker.list=host2 worker.ajp13.port=9009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 ps=/ worker.list=host3 worker.ajp13.port=10009 worker.ajp13.host=localhost worker.ajp13.type=ajp13 -- workers.properties file -- -- httpd.conf file -- ServerName host1:8009 DocumentRoot /usr/local/tomcat55/webapps/host1 DirectoryIndex index.html index.jsp ... LoadModule jk_module /usr/lib64/httpd/modules/mod_jk.so JkWorkersFile "/usr/local/tomcat55/conf/jk/host1-workers.properties" JkLogFile "/usr/local/tomcat55/logs/host1-mod_jk.log" JkLogLevel debug Alias / "/usr/local/tomcat55/webapps/host1" Options Indexes +FollowSymLinks JkMount /* host1 ... ServerName host1:9009 DocumentRoot /usr/local/tomcat55/webapps/host2 DirectoryIndex index.html index.jsp ... LoadModule jk_module /usr/lib64/httpd/modules/mod_jk.so JkWorkersFile "/usr/local/tomcat55/conf/jk/host2-workers.properties" JkLogFile "/usr/local/tomcat55/logs/host2-mod_jk.log" JkLogLevel debug Alias / "/usr/local/tomcat55/webapps/host2" Options Indexes +FollowSymLinks JkMount /* host2 ... -- httpd.conf file -- -- server.xml file -- ... -- server.xml file -- Try that and see how it works, again I did something similar with mod_jk2, I havent done this yet in mod_jk that is coming next. If you have different paths and arent putting the code in webapps, I currently have different paths for the different code, then the big change will be in the Server.xml where the appbase will need to be the full path to the code. Let me know if this works or if you did any tweeks. HTH Dan >From: "Jonathan Woods" <[EMAIL PROTECTED]> >Reply-To: "Tomcat Users List" >To: >Subject: mod_jk configuration directives in VirtualHost sections >Date: Wed, 25 Jan 2006 21:55:55 - > >Hello, list. > >I have Apache 1.3.33 running on Linux and talking successfully to >Tomcat >5.5.15 through mod_jk. I'd now like to host multiple instances of >Tomcat (or maybe just multiple Tomcat connectors within one instance) >to receive requests dispatched at multiple VirtualHosts on the same server. > >Is it possible to have more than one workers.properties file, and >therefore more than one JkWorkersFile directive, per Apache? Ideally, >I'd like one workers.properties file per VirtualHost just to make app-building easier. >The documentation says that certain directives may be repeated in >VirtualHost sections - e.g. JkLogFile - but doesn't mention JkWorkersFile. > >Thanks in advance - > >Jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]