Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
By the way where are you going?
Tahoe season is over so I can't think of any other place to go except probably for Yosemity but I bet it is still cold over there
I went to AZ.
Quote:
Hello again,
DirectoryIndex as I understand only determines which files are to be loaded by default.
such as if I have index.jsp there I can say www.myDomain.net without having have to say www.myDomain.net/index.jsp
DirectoryRoot seems to be the one I need. However, if I put path to my app there:
DirectoryRoot /home/myLogin/jakarta-tomcat.../webapps/WEB/AAA it does not do the trick.
I guess I am missing somthing out.
So, you've got both DirectoryIndex specified, listing index.jsp AND DocumentRoot pointing to the location of index.jsp? Can you post your current httpd.conf file so we can confirm this?
Options Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
AllowOverride Options FileInfo AuthConfig Limit
Order allow,deny
Allow from all
</Directory>
<IfModule mod_userdir.c>
UserDir /home/mylogin/public_html
</IfModule>
<Directory /home/*/public_html>
AllowOverride Options FileInfo AuthConfig Limit
Options Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Allow from all
</LimitExcept>
</Directory>
Alias /WEB /home/my.login/jakarta-tomcat-5.5.9/webapps/WEB
<Directory "/var/www/icons">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule mod_dav_fs.c>
# Location of the WebDAV lock database.
DAVLockDB /var/lib/dav/lockdb
</IfModule>
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Alias /error/ "/var/www/error/"
<IfModule mod_negotiation.c>
<IfModule mod_include.c>
<Directory "/var/www/error">
AllowOverride None
Options IncludesNoExec
AddOutputFilter Includes html
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en es de fr
ForceLanguagePriority Prefer Fallback
</Directory>
Where are the mod_jk options in httpd.conf? Read this and get your mod_jk options setup. Be sure to read the links to the workers.properties documentation too.
#
# When loaded, the mod_proxy_ajp module adds support for
# proxying to an AJP/1.3 backend server (such as Tomcat).
# To proxy to an AJP backend, use the "ajp://" URI scheme;
# Tomcat is configured to listen on port 8009 for AJP requests
# by default.
#
#
# Uncomment the following lines to serve the ROOT webapp
# under the /tomcat/ location, and the jsp-examples webapp
# under the /examples/ location.
#
#ProxyPass /tomcat/ ajp://localhost:8009/
#ProxyPass /examples/ ajp://localhost:8009/jsp-examples/
Thanks for posting that. I think you should define the Apache configuration settings for mod_jk, per the doc I linked to above. Then we'll see if that solves this problem.
You can see samples of these settings being set here and here.
is it wrong to put my app in ROOT and serve it from there?
I think that's a different question from what we're working on. We need to get Apache to load the mod_jk2 module and let mod_jk2 contact Tomcat and run the JSP script. If you add the mod_jk settings as described in the doc I linked to above, that should tell Apache how to run mod_jk2 and tell mod_jk2 what it needs to do to run the JSP script.
1. I have a different include in httpd.conf - LoadModule jk2_module modules/mod_jk2.so. I guess it should be fine
Be sure to read the documentation and not just look at the examples. You need to understand the settings used in the examples posted. The first example uses mod_jk and you're using mod_jk2, so your current LoadModule line should be correct, right?
Quote:
2. I have these properites
they are the same as declared in first link except that worker.list has both ajp12 and ajp13
Ok, that's the worker.properties file.
Quote:
3. The only entry about ajp in my server.xml file that I have is this:
Ok, that looks like it will redirect to a SSL port Tomcat might be listening on. We can deal with that later. Leave that alone for now.
or did you add that? Keep in mind, you're using Tomcat 5, not 4 so you will have to make sure you're using Tomcat 5 classes, etc.
Now that you have your workers.properties setup, what have you done to your httpd.conf to reference it? Where have you added the other mod_jk2 settings in httpd.conf?
I went through installation instructions such as installing, editing httpd.conf, creating properties files and I thought that's it to it but nah, 100 more config steps needed!
And I am still not sure if I should be running Tomcat standalone or not.
Anyhow, I'll go through docs and make some sense of it.
Yep, I know it can really drive you crazy. That's why people tend to advise that people read documentation and get an idea of what they need/want and most importantly get an understanding of what's going on. If you're looking for the path of absolute least resistance, you should have hired a contractor to get it setup for you.
At the start of all this, I asked if you needed an Apache front-end vs running Tomcat standalone. It sounded like some security article you read tipped the scale in favor of an Apache front-end and here we are today. You're the system admin, in this case, so it's within your realm to get all this worked out.
We've been focusing on Apache and Tomcat configuration and none of this is Linux specific. When you used Tomcat on Windows, I'm betting you ran it standalone.
Quote:
I went through installation instructions such as installing, editing httpd.conf, creating properties files and I thought that's it to it but nah, 100 more config steps needed!
Once you get the mod_jk2 settings in your httpd.conf file, post your httpd.conf file here and we can take a peek at where you're at.
Quote:
And I am still not sure if I should be running Tomcat standalone or not.
Well, this is a question only you can answer since it's your server and web content that needs to be served.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.