This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JForum and the fly likes Help setting jforum and Apache->Tomcat connector Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » JForum
Bookmark "Help setting jforum and Apache->Tomcat connector" Watch "Help setting jforum and Apache->Tomcat connector" New topic
Author

Help setting jforum and Apache->Tomcat connector

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hello all,
I have a problem while I am trying to run jforum and connect apache-tomcat with mod_jk connector. When I am typing http://localhost:8080/jforum - everything is just fine. But I want to access the forum with forum.mycompany.com. Before explain my conf files I will say that I am using Suse Linux Enterprise Server. I have put jforum in /srv/www/tomcat5/base/webapps. I have a virtual host defined in my apache and it looks like this:

<VirtualHost 10.0.11.51:80>
ServerAdmin webmaster@mycompany.com
ServerName forum.mycompany.com:8080
ServerAlias forum.mycompany.com
ErrorLog /var/log/apache2/forum.mycompany.com-error_log
CustomLog /var/log/apache2/forum.mycompany.com-access_log combined
HostnameLookups Off
UseCanonicalName Off
JkMount /jforum/* ajp13
</VirtualHost>

My jk.conf file is this:

<IfModule mod_jk.c>
JkWorkersFile /etc/tomcat5/base/workers.properties
JkLogFile /var/log/tomcat5/base/mod_jk.log
# Log level to be used by mod_jk
JkLogLevel error
# The following line makes apache aware of the location of
# the /jforum context
Alias /jforum "/srv/www/tomcat5/base/webapps/jforum"
<Directory "/srv/www/tomcat5/base/webapps/jforum">
Options Indexes FollowSymLinks
allow from all
</Directory>
# The following line makes apache aware of the location of
# the /servlets-examples context
Alias /servlets-examples "/srv/www/tomcat5/base/webapps/servlets-examples"
<Directory "/srv/www/tomcat5/base/webapps/servlets-examples">
Options Indexes FollowSymLinks
allow from all
</Directory>
# The following line makes apache aware of the location of
# the /jsp-examples context
Alias /jsp-examples "/srv/www/tomcat5/base/webapps/jsp-examples"
<Directory "/srv/www/tomcat5/base/webapps/jsp-examples">
Options Indexes FollowSymLinks
allow from all
</Directory>
# The following line mounts all JSP files and the /servlet/ uri to tomcat
JkMount /servlets-examples/servlet/* ajp13
JkMount /jsp-examples/*.jsp ajp13
# The following line prohibits users from directly accessing WEB-INF
<Location "/jsp-examples/WEB-INF/">
AllowOverride None
deny from all
</Location>
<Location "/servlets-examples/WEB-INF/">
AllowOverride None
deny from all
</Location>
</IfModule>

In my workers.properties file I have pointed the Tomcat base directory and JAVA home directory.

I have a DNS and I have set it so forum.mycompany.com i going to the apache server. When i access forum.mycompany.com it came up a blank page with IT WORKS line. I have read a lot tutorials about connecting apache and tomcat but I have no success. Can you tell me what I am missing.
Thank you in advance.

[originally posted on jforum.net by chandler_kiril]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424

In my workers.properties file I have pointed the Tomcat base directory and JAVA home directory.


Sounds like you're using an older workers properties file format (ajp12?). A current jk workers.properties file doesn't have directory names but looks like:



Note the ajp13 in the worker.list, default.worker, and worker.ajp13.* properties is just a name that is associated with the JkMount worker tag. E.g.:

JkMount /jforum/* ajp13 <- this is a name used in worker.list
[originally posted on jforum.net by monroe]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
I don't know if I would be better off starting a new thread or hitchike onto this one? But here goes. I am trying to do a similar configuration but I am using MOD_PROXY_AJP.

Here is my VirtualHost settings:

<VirtualHost *:80>
ServerAdmin webmaster@blahblah.com
DocumentRoot /var/www/html
ServerName igames.blahblah.com
ServerAlias *.blahblah.com
<Location /jforum>
Options All
AuthName "iGames Forum Login"
AuthType Basic
AuthUserFile /var/www/.htpasswd
Require valid-user
</Location>
<Location /igamesWebApp>
Options All
AuthName "igamesWebApp Login"
AuthType Basic
AuthUserFile /var/www/.htpasswd
Require valid-user
</Location>
ProxyPass /jforum ajp://localhost:8009/jforum
ProxyPass /igamesWebApp ajp://localhost:8009/igamesWebApp
ErrorLog logs/igames.blahblah.com-error_log
CustomLog logs/igames.blahblah.com-access_log common
</VirtualHost>

I haven't modified the server.xml file as I wasn't really sure what I needed to modify.

I can connect to jforum just fine. However, I can never successfuly login unless I go to http://igames.blahblah.com:8400/jforum.

any help would be appreciated.
[originally posted on jforum.net by LichW]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help setting jforum and Apache->Tomcat connector
 
Similar Threads
Session lost due to....?
Syntax Error in tomcat-apache.conf!! - URGENT!!
Trouble integrating Apache HTTP server with Tomcat
Using Apache/Tomcat on a URL other than localhost
getting set up apache/tomcat