Linux - Software This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
|
05-02-2006, 01:43 PM
|
#76
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
Quote:
Originally Posted by thisObject
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?
Peace...
|
|
|
05-02-2006, 10:42 PM
|
#77
|
Member
Registered: Apr 2006
Posts: 170
Original Poster
Rep:
|
Hello,
If I change DocumentRoot and DocumentIndex it hangs for a little while and then brings 503 Service Temporarily
Unavailable.
I guess I can solve this by putting my app in ROOT, right?
Thanks
Here is httpd.conf.
I took all comments out
Quote:
LoadModule jk2_module modules/mod_jk2.so
ServerTokens OS
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 120
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule prefork.c>
StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>
<IfModule worker.c>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
Listen 80
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule cgi_module modules/mod_cgi.so
Include conf.d/*.conf
User apache
Group apache
ServerAdmin someEmail@someDomain.com
ServerName myDomain.net
UseCanonicalName On
DocumentRoot /home/myLogin/jakarta-tomcat-5.5.9/webapps/WEB/AAA
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/var/www/html">
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>
DirectoryIndex /home/my.login/jakarta-tomcat-5.5.9/webapps/WEB/AAA/index.jsp index.html index.html.var index.shtml index.cgi index.php index.phtml index.php3 index.htm home.html welcome.html
AccessFileName .htaccess
<Files ~ "^\.ht">
Order allow,deny
Deny from all
</Files>
TypesConfig /etc/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
# MIMEMagicFile /usr/share/magic.mime
MIMEMagicFile conf/magic
</IfModule>
HostnameLookups Off
ErrorLog logs/error_log
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog logs/access_log combined
ServerSignature On
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>
IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon /icons/unknown.gif
ReadmeName README.html
HeaderName HEADER.html
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
ForceLanguagePriority Prefer Fallback
AddDefaultCharset UTF-8
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php .phps .php3 .phtml .html .htm .shtml .fds
AddHandler cgi-script .cgi .pl
AddHandler type-map var
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>
</IfModule>
</IfModule>
BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
#</IfModule>
# End of proxy directives.
|
|
|
|
05-02-2006, 11:05 PM
|
#78
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
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.
Also, change:
Code:
DirectoryIndex /home/my.login/jakarta-tomcat-5.5.9/webapps/WEB/AAA/index.jsp index.html index.html.var index.shtml index.cgi index.php index.phtml index.php3 index.htm home.html welcome.html
to
Code:
DirectoryIndex index.jsp index.html index.html.var index.shtml index.cgi index.php index.phtml index.php3 index.htm home.html welcome.html
|
|
|
05-02-2006, 11:42 PM
|
#79
|
Member
Registered: Apr 2006
Posts: 170
Original Poster
Rep:
|
hello,
very top line says: LoadModule jk2_module modules/mod_jk2.so
this is the only line that I had to add during set up
|
|
|
05-02-2006, 11:53 PM
|
#80
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
Ok, in /etc/httpd can you see if there is a "conf.d" directory. I want to see what's in there:
$ ls -l /etc/httpd/conf.d
Please post the output here.
Peace...
|
|
|
05-02-2006, 11:54 PM
|
#81
|
Member
Registered: Apr 2006
Posts: 170
Original Poster
Rep:
|
here it is
Quote:
-rw-r--r-- 1 root root 707 Feb 11 23:35 auth_kerb.conf
-rw-r--r-- 1 root root 3492 Feb 28 01:13 auth_mysql.conf
-rw-r--r-- 1 root root 3512 Feb 10 23:11 auth_pgsql.conf
-rw-r--r-- 1 root root 517 Feb 11 23:32 authz_ldap.conf
-rw-r--r-- 1 root root 868 Feb 23 02:23 awstats.conf
-rw-r--r-- 1 root root 295 Feb 11 15:12 manual.conf
-rw-r--r-- 1 root root 420 Apr 3 06:52 mediawiki.conf
-rw-r--r-- 1 root root 1796 Apr 22 2005 perl.conf
-rw-r--r-- 1 root root 560 Feb 28 03:22 php.conf
-rw-r--r-- 1 root root 566 Feb 11 15:12 proxy_ajp.conf
-rw-r--r-- 1 root root 1671 Feb 27 07:57 python.conf
-rw-r--r-- 1 root root 392 Feb 11 15:12 README
-rw-r--r-- 1 root root 332 Feb 12 01:40 squid.conf
-rw-r--r-- 1 root root 9677 Feb 11 15:12 ssl.conf
-rw-r--r-- 1 root root 352 Feb 12 10:55 webalizer.conf
-rw-r--r-- 1 root root 299 Feb 11 15:12 welcome.conf
|
|
|
|
05-03-2006, 12:04 AM
|
#82
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
Can you post the contents of /etc/httpd/conf.d/proxy_ajp.conf?
Thanks!
Peace...
|
|
|
05-03-2006, 12:06 AM
|
#83
|
Member
Registered: Apr 2006
Posts: 170
Original Poster
Rep:
|
sure
Quote:
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
#
# 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
|
|
|
05-03-2006, 12:15 AM
|
#84
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
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.
Peace...
Last edited by tomdkat; 05-03-2006 at 12:16 AM.
|
|
|
05-03-2006, 12:16 AM
|
#85
|
Member
Registered: Apr 2006
Posts: 170
Original Poster
Rep:
|
is it wrong to put my app in ROOT and serve it from there?
thank you
|
|
|
05-03-2006, 12:21 AM
|
#86
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
Quote:
Originally Posted by thisObject
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.
Peace...
|
|
|
05-03-2006, 12:44 AM
|
#87
|
Member
Registered: Apr 2006
Posts: 170
Original Poster
Rep:
|
Hi,
I took a look at first link:
1. I have a different include in httpd.conf - LoadModule jk2_module modules/mod_jk2.so. I guess it should be fine
2. I have these properites
Quote:
worker.list=ajp12, ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
|
they are the same as declared in first link except that worker.list has both ajp12 and ajp13
3. The only entry about ajp in my server.xml file that I have is this:
Quote:
<Connector port="8009"
enableLookups="false" redirectPort="8443" protocol="AJP/1.3" />
|
I am not sure if I need to change it to this:
Quote:
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0"/>
|
as it says in first link you sent.
Thanks.
|
|
|
05-03-2006, 10:49 AM
|
#88
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
Quote:
Originally Posted by thisObject
I took a look at first link:
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.
Quote:
I am not sure if I need to change it to this:
as it says in first link you sent.
|
Did this already exist in your server.xml file:
Code:
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0"/>
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?
linky.
Peace...
|
|
|
05-03-2006, 12:01 PM
|
#89
|
Member
Registered: Apr 2006
Posts: 170
Original Poster
Rep:
|
Maaaaaaaaan, this drives me nuts!
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.
Thanks!
|
|
|
05-03-2006, 02:30 PM
|
#90
|
Member
Registered: May 2003
Location: S.F. Bay Area
Distribution: Ubuntu 9.04 AMD64
Posts: 595
Rep:
|
Quote:
Originally Posted by thisObject
Maaaaaaaaan, this drives me nuts! 
|
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.
Peace...
|
|
|
All times are GMT -5. The time now is 07:34 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|