• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

apache2 jk2 404

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I have apache2 server with mod_jk2 that is mapping to tomcat. I spent two days trying to install jforum, but I have no luck with it. I'm getting 404 error trying to access it at address http://www.e-driver.eu/jforum/forums/list.page. Maybe someone can tell me how to use workers2.properties or some others config files to make jforum run. My default application located at http://www.e-driver.eu/E-Driver/ is working great. I'm using kattare.com servlet provider.
I installed jforum on my home server with no trouble, but I didn't had to use jk2.
[originally posted on jforum.net by madmak]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
FWIW, The Apache Tomcat JK2 project has been "deprecated". Mostly because the development community lost interest.

However, the JK folks are still going strong... I know because I used to try to run JK2 to connect IIS to TC. It worked but it kept failing randomly and requiring IIS restarts. I couldn't figure it out and nobody answered any e-mail queries about it... except to say.. use JK.

That said, I can't give you a magic pill, but you should try to break the issue down into sections.

First, can you run jforum directly from Tomcat (e.g. host:8080/jforum...). That will tell you if jForum is install and working correctly.

Second, is the 404 error a Tomcat 404 or an Apache 404 (TC has blue bar). That will tell you that the request is getting to TC but something might be wrong with a proxy setting (TC error) or something might be wrong with the JK install / mappings (Apache error).

Is JK working with any other app (I think you answered this one... but..)? This will tell you if the JK adaptor is installed on both end correctly.

If this is the case, then it's probaby a config file issue. Are you manually generating these or is TC generating them. I know there are some undocumented gotcha's with the JK generation classes (like having to be placed in Context and Host (I think) elements with an "append" attribute.

Remember, log files are your friend. The JK* connectors both have ways to up your log levels to debug. This might give you a clue. Plus the TC access logs might let you see what a proxy change is doing to your request, etc.

Good luck and remember that Google is your friend.. there are lots of blogs and other resources about linking Apache to TC out there.

Greg




[originally posted on jforum.net by monroe]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm running JForum under Tomcat behind Apache. I was successful in getting it to work two different ways.

First, JForum uses .page documents in addition to .jsp documents. So the first method that seems to work is to also map .page documents to the j2k driver using a JKMount directive. Mine looks like this:



The other technique, which is probably more fool proof, is to set up JForum so it runs stand-alone at some address/port and then redirect all requests from Apache to JForum using PassProxy and PassProxyReverse. When I was testing this technique, my directives looked like this:


[originally posted on jforum.net by jbucanek]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your answer. I'm on virtual server and I don't have access to all config files. This are files that I can change:

catalina.policy
catalina.properties
context.xml
jk2.manifest
jk2.properties
jkconf.ant.xml
jkconfig.manifest
server-minimal.xml
server.xml
shm.manifest
tomcat-jk2.manifest
tomcat-users.xml
velocity.log
web.xml
workers.properties
workers2.properties
workers2.properties.minimal

I think is for use with jk not jk2, and Proxy is set in apache2.conf ?
[originally posted on jforum.net by madmak]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I have all application in wars and I'm only uploading them to webapps directory. They are working immediately.
I'm copying JForum to webapps and I'm executing http://www.e-driver.eu/jforum/install.jsp. It's working but wizard after last page is finishing with 404 (apache error) like this one: http://www.e-driver.eu/jforum/forums/list.page. So I don't know exactly what is the problem, because install.jsp is working. Maybe because of .page but in other hand .do is working.
[originally posted on jforum.net by madmak]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I think Code:
JKMount /*.page JBoss1
is for use with jk not jk2, and Proxy is set in apache2.conf ?



Both are in Apache's configuration. When I started out, the basic problem was getting Apache to forward requests for certain pages to Tomcat. Typically, Apache is only configured to forward *.jsp documents to Tomcat. Other document types (.html, .jpg, .gif, ...) are handled directly by Apache and Tomcat never sees those requests.

The JK* approach is surgical, specifically forwarding .page requests to Tomcat/JForum for processing. The PassProxy approach is a hammer which passes all requests to Tomcat, then forwards the responses to the client. Both solutions are on the Apache side of the configuration, since it's Apache that has to decide what requests to forward. Tomcat can't do anything about requests that are never sent to it.

If this is your problem and you can't change the Apache config files, look into adding those directives to your local directory via a .htaccess file.
[originally posted on jforum.net by jbucanek]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
httpd.conf (my section):



I added .htaccess in catalog jforum/forums:

Now no error but empty page :/
[originally posted on jforum.net by madmak]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Without $1 accessing http://www.e-driver.eu/jforum redirects me to http://www.e-driver.eu/.

[originally posted on jforum.net by madmak]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Rewrite is not going to change what requests get forwarded to Tomcat.
[originally posted on jforum.net by jbucanek]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I couldn't make it working with .htaccess so I write an email to admin of kattare server to include proxy in httpd.conf for me. They did it and I have no problem anymore.
[originally posted on jforum.net by madmak]
 
Opportunity is missed by most people because it is dressed in overalls and looks like work - Edison. Tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic