You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mark Eggers <it...@yahoo.com> on 2003/12/01 22:37:59 UTC

Tomcat FAQs on Wiki

Folks,

I have put some of my documentation on the Tomcat Wiki
at:

http://nagoya.apache.org/wiki/apachewiki.cgi?TomcatWeb

These are sort of bare-bones documents about some ways
to connect Tomcat/Apache on Linux, Tomcat/Apache on
Windows/2000, and Tomcat/IIS 5 on Windows/2000.

Hopefully this will be of some use.

/mde/
just my two cents . . . .

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Configure tomcat for LDAP

Posted by Damien Pacaud <dp...@prisma-presse.com>.
Hi, i want to use LDAP to athenticate my users on a JSP application and
would like to know how to configure TOMCAT so that i can acces the login of
the current user through a jsp ?

for now, i have it all set on apache, in the virtual host using ath_ldap .
my problem is that the request.getRemoteUser() method always returns null in
my jsp application...
but apache writes the login of the user in the acces.log ....so i guess it
is a conf problem with tomcat...

Does anyone have an idea, or a url that could halp ??
thanks in advance



-----------------------
le présent message (ainsi que ses éventuelles pièces jointes) peut
contenir des informations confidentielles. Etant établi à l'intention de ses
destinataires, son utilisation ou diffusion non autorisée est interdite.

Tout message électronique étant susceptible d'altération, Prisma Presse
décline toute responsabilité au titre dudit message en cas de falsification.

Ce message a été traité par un anti virus et aucun virus connu n'a été détecté.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat FAQs on Wiki - mod_jk2 howto

Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
Tim Funk wrote:

> Writing anything like that for the list is a good thing since we can 
> always link to it in the archives ;)

Here goes.

STEP 1
------

Build "mod_jk2.so" and "jkjni.so" - do whatever needs to be done :-)

STEP 2
------

Place mod_jk2.so and jkjni.so with other Apache modules. In case of Mandrake 
9.1, it was in /usr/lib/apache2-extramodules

STEP 3
------

Setup your Apache virtual host. Although you can run without it, I prefer going 
the "right way". In my case:

/etc/httpd/conf.d/75_mod_jk2.conf
---------------------------------
#
# Sample Apache configuration file for mod_jk2.
# Include this in your httpd.conf.
#
<IfDefine HAVE_JK2>
     <IfModule !mod_jk2.c>
         LoadModule      jk2_module extramodules/mod_jk2.so
     </IfModule>
</IfDefine>

<IfModule mod_jk2.c>
     #
     # Restrict access to JK status handler
     #
     <Location "/jkstatus/">
         Order Deny,Allow
         Deny from all
         Allow from 127.0.0.1
         Allow from 192.168.61.110
     </Location>
</IfModule>

/etc/httpd/2.0/conf/vhosts/External.ev.co.yu
<VirtualHost 192.168.61.12:80>
     ServerName          External.ev.co.yu
     ServerAdmin         Nikola.Milutinovic@ev.co.yu
     DocumentRoot        /home/www/public_html
     ErrorLog            /home/www/logs/error.log
     CustomLog           /home/www/logs/access.log common
     <IfModule mod_alias.c>
         ScriptAlias /cgi-bin/ "/home/www/cgi-bin/"
     </IfModule>
     <Directory /home/www/public_html>
         AllowOverride FileInfo AuthConfig Limit Indexes
         Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
         <Limit GET POST HEAD OPTIONS PROPFIND>
             Order allow,deny
             Allow from all
         </Limit>
         <LimitExcept GET POST HEAD OPTIONS PROPFIND>
             Order deny,allow
             Deny from all
         </LimitExcept>
     </Directory>
     <Directory /home/www/cgi-bin>
         AllowOverride None
         Options FollowSymLinks
         Order allow,deny
         Allow from all
     </Directory>
</VirtualHost>

STEP 4
------

Setup virtual host on Tomcat.

/etc/tomcat/server.xml
----------------------
<Host name="External.ev.co.yu" debug="0" appBase="/home/www/webapps"
       unpackWARs="true">
   <Valve className="org.apache.catalina.valves.AccessLogValve"
          directory="logs"  prefix="external_access_log." suffix=".txt"
          pattern="common"/>
   <Logger className="org.apache.catalina.logger.FileLogger" directory="logs"
           prefix="external_log." suffix=".txt" timestamp="true"/>
   <Context docBase="ConsumerBill" path="/bill" reloadable="true">
     <!-- setupt datasources as needed -->
   </Context>
</Host>

STEP 5
------

Setup JK2 on Tomcat side.

/etc/tomcat4/jk2.properties
---------------------------
# Set the desired handler list
# handler.list=apr,request,channelJni
handler.list=apr,request,channelUnix
#
apr.NativeSo=/usr/lib/apache2-extramodules/jkjni.so

request.tomcatAuthentication=false

channelUnix.file=${jkHome}/work/tomcat.sock

STEP 6 !!!
----------

Ensure that jkjni.so picks up "serverConf" value from environment! The easiest 
way for me was to edit /etc/tomcat/tomcat4.conf and add:

serverRoot=/etc/httpd/2.0
export serverRoot

If you're not using RPM version, just make sure that *that* variable is defined 
in the script starting tomcat. This is needed by jkjni.so, so it can locate 
workers2.properties. And if you're wondering, jkjni.so is needed to talk to UNIX 
domain socket. Tomcat can open it without using "handler apr" and jkjni.so, but 
refuses to communicate over it.

STEP 7
------

Setup your Apache side of JK2. Edit ${serverConf}/worker2.properties file. You 
must define socket channel, ajp13 worker and at least one URI mapping to your 
virtual host. Needless to say, VHost definitions on Tomcat and Apache must 
(should?) match.

/etc/httpd/2.0/conf/workers2.properties
---------------------------------------
[logger]
level=DEBUG

[config:]
debug=0
debugEnv=0

[uriMap:]
info=Maps the requests. Options: debug
debug=0

# Alternate file logger
[logger.file:0]
level=DEBUG
file=/var/log/httpd/mod_jk2.log

[workerEnv:]
info=Global server options
timing=1
debug=0

[channel.un:unixsock]
info=Main socket to Tomcat engine
file=/var/tomcat4/work/tomcat.sock

[status:]
info=Status worker, displays runtime informations

[ajp13:unixsock]
info=Default AJP 1.3 worker
channel=channel.un:unixsock

[uri:/jkstatus/*]
info=Display status information and checks the config file for changes.
group=status:

[uri:external.ev.co.yu/bill]
info=Consumers bill
group=ajp13:unixsock

STEP 8
------

Restart Tomcat and then Apache.

Nix.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat FAQs on Wiki

Posted by Tim Funk <fu...@joedog.org>.
Writing anything like that for the list is a good thing since we can always 
link to it in the archives ;)

Each Wiki has its quirks and can be a PITA.

-Tim

Nikola Milutinovic wrote:

> Tim Funk wrote:
> 
>> Google for Wiki. Most of the links are great and you'll learn more 
>> about Wiki than you wish to know.
>>
>> The best page about Wikis is this one: http://c2.com/cgi/wiki
> 
> 
> I still haven't figured out how to publish to Wiki and frankly, I don't 
> have the time. I'm up to my ass in crocodiles. After having setup Linux 
> + PostgreSQL + Apache + Tomcat, I have to move the server into the open 
> Internet.
> 
> I can write the brief article on setting it up tot he list. Would 
> someone post it to WiKi?



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat FAQs on Wiki

Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
Tim Funk wrote:

> Google for Wiki. Most of the links are great and you'll learn more about 
> Wiki than you wish to know.
> 
> The best page about Wikis is this one: http://c2.com/cgi/wiki

I still haven't figured out how to publish to Wiki and frankly, I don't have the 
time. I'm up to my ass in crocodiles. After having setup Linux + PostgreSQL + 
Apache + Tomcat, I have to move the server into the open Internet.

I can write the brief article on setting it up tot he list. Would someone post 
it to WiKi?

Nix.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat FAQs on Wiki

Posted by Tim Funk <fu...@joedog.org>.
Google for Wiki. Most of the links are great and you'll learn more about Wiki 
than you wish to know.

The best page about Wikis is this one: http://c2.com/cgi/wiki

-Tim

Adam Hardy wrote:
> On 12/02/2003 07:55 AM Nikola Milutinovic wrote:
> 
>> Mark Eggers wrote:
>>
>>> I have put some of my documentation on the Tomcat Wiki
>>> at:
>>>
>>> http://nagoya.apache.org/wiki/apachewiki.cgi?TomcatWeb
>>>
>>> These are sort of bare-bones documents about some ways
>>> to connect Tomcat/Apache on Linux, Tomcat/Apache on
>>> Windows/2000, and Tomcat/IIS 5 on Windows/2000.
>>
>>
>> How does one contribute? I know Wiki is supposed to be free for 
>> everyone to edit, but I've never done it. Any quick pointers, links,...?
>>
>> I have managed to setup mod_jk2 over UNIX socket.
> 
> 
> Check out http://nagoya.apache.org/wiki/apachewiki.cgi?ApacheWiki
> 
> Adam
> 
> PS perhaps you should stick this link somewhere central in wiki as well.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat FAQs on Wiki

Posted by Adam Hardy <ah...@cyberspaceroad.com>.
On 12/02/2003 07:55 AM Nikola Milutinovic wrote:
> Mark Eggers wrote:
>> I have put some of my documentation on the Tomcat Wiki
>> at:
>>
>> http://nagoya.apache.org/wiki/apachewiki.cgi?TomcatWeb
>>
>> These are sort of bare-bones documents about some ways
>> to connect Tomcat/Apache on Linux, Tomcat/Apache on
>> Windows/2000, and Tomcat/IIS 5 on Windows/2000.
> 
> How does one contribute? I know Wiki is supposed to be free for everyone 
> to edit, but I've never done it. Any quick pointers, links,...?
> 
> I have managed to setup mod_jk2 over UNIX socket.

Check out http://nagoya.apache.org/wiki/apachewiki.cgi?ApacheWiki

Adam

PS perhaps you should stick this link somewhere central in wiki as well.
-- 
struts 1.1 + tomcat 5.0.14 + java 1.4.2
Linux 2.4.20 RH9

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat FAQs on Wiki

Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
Mark Eggers wrote:

> Folks,
> 
> I have put some of my documentation on the Tomcat Wiki
> at:
> 
> http://nagoya.apache.org/wiki/apachewiki.cgi?TomcatWeb
> 
> These are sort of bare-bones documents about some ways
> to connect Tomcat/Apache on Linux, Tomcat/Apache on
> Windows/2000, and Tomcat/IIS 5 on Windows/2000.
> 
> Hopefully this will be of some use.

How does one contribute? I know Wiki is supposed to be free for everyone to 
edit, but I've never done it. Any quick pointers, links,...?

I have managed to setup mod_jk2 over UNIX socket.

Nix.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Tomcat FAQs on Wiki

Posted by Cliff Willsher <cl...@iabatab.com>.
Mark,

Thank you for this. With a just a little jiggery-pokery I was able to get 
Tomcat5 and IIS5 working together in minutes after many frustrating hours.

Thanks again.
Cliff


At 13:37 01/12/2003 -0800, you wrote:
>Folks,
>
>I have put some of my documentation on the Tomcat Wiki
>at:
>
>http://nagoya.apache.org/wiki/apachewiki.cgi?TomcatWeb
>
>These are sort of bare-bones documents about some ways
>to connect Tomcat/Apache on Linux, Tomcat/Apache on
>Windows/2000, and Tomcat/IIS 5 on Windows/2000.
>
>Hopefully this will be of some use.
>
>/mde/
>just my two cents . . . .
>
>__________________________________
>Do you Yahoo!?
>Free Pop-Up Blocker - Get it now
>http://companion.yahoo.com/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org