tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "v.siguier" <v.sigu...@voila.fr>
Subject Re: Apache + Tomcat + mod_jk
Date Thu, 31 Jul 2003 07:26:06 GMT
Following are my config files (my new application is called geode):

httpd.conf :
-------------
ServerRoot "C:/Apache/Apache2"
PidFile logs/httpd.pid
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
<IfModule mpm_winnt.c>
ThreadsPerChild 250
MaxRequestsPerChild  0
</IfModule>
Listen 8081
LoadModule access_module modules/mod_access.so
LoadModule actions_module modules/mod_actions.so
LoadModule alias_module modules/mod_alias.so
LoadModule asis_module modules/mod_asis.so
LoadModule auth_module modules/mod_auth.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule dir_module modules/mod_dir.so
LoadModule env_module modules/mod_env.so
LoadModule imap_module modules/mod_imap.so
LoadModule include_module modules/mod_include.so
LoadModule isapi_module modules/mod_isapi.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module modules/mod_mime.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule jk_module modules/mod_jk-2.0.43.dll
ServerAdmin admin@tata.com
ServerName toto.tata.com:8081
UseCanonicalName Off
DocumentRoot "C:/Apache/Apache2/htdocs"
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
<Directory "C:/Apache/Apache2/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
UserDir "My Documents/My Website"
DirectoryIndex index.html index.html.var
AccessFileName .htaccess
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
</Files>
TypesConfig conf/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
    MIMEMagicFile conf/magic
</IfModule>
HostnameLookups Off
...
ServerTokens Full
ServerSignature On
Alias /icons/ "C:/Apache/Apache2/icons/"
<Directory "C:/Apache/Apache2/icons">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
AliasMatch ^/manual(?:/(?:de|en|fr|ja|ko|ru))?(/.*)?$ "C:/Apache/Apache2/manual$1"

<Directory "C:/Apache/Apache2/manual">
    Options Indexes
    AllowOverride None
    Order allow,deny
    Allow from all

    <Files *.html>
        SetHandler type-map
    </Files>

    SetEnvIf Request_URI ^/manual/de/ prefer-language=de
    SetEnvIf Request_URI ^/manual/en/ prefer-language=en
    SetEnvIf Request_URI ^/manual/fr/ prefer-language=fr
    SetEnvIf Request_URI ^/manual/ja/ prefer-language=ja
    SetEnvIf Request_URI ^/manual/ko/ prefer-language=ko
    SetEnvIf Request_URI ^/manual/ru/ prefer-language=ru
    RedirectMatch 301 ^/manual(?:/(de|en|fr|ja|ko|ru)){2,}(/.*)?$ /manual/$1$2
</Directory>
ScriptAlias /cgi-bin/ "C:/Apache/Apache2/cgi-bin/"
<Directory "C:/Apache/Apache2/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>
IndexOptions FancyIndexing VersionSort
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
...
AddType application/x-tar .tgz
AddType image/x-icon .ico
AddHandler type-map var
<IfModule mod_ssl.c>
    Include conf/ssl.conf
</IfModule>
Include c:/jakarta-tomcat-4-1-24/conf/auto/mod_jk.conf



server.xml :
--------------
<Server port="8005" shutdown="SHUTDOWN" debug="0">
	<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" modJk="c:/apache/Apache2/modules/mod_jk-2.0.43.dll"
/> 
        <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" descriptors="/com/fnac/geode/mbeans/mbean-descriptor.xml"
debug="0" jsr77Names="false"/>
  	<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" debug="0"/>

  
  	<GlobalNamingResources>
    		<!-- Test entry for demonstration purposes -->
    		<Environment name="simpleValue" type="java.lang.Integer" value="30"/>

    		<!-- Editable user database that can also be used by
         	UserDatabaseRealm to authenticate users -->
    		<Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"></Resource>
    		<ResourceParams name="UserDatabase">
      			<parameter>
        			<name>factory</name>
        			<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
      			</parameter>
      			<parameter>
        			<name>pathname</name>
        			<value>conf/tomcat-users.xml</value>
      			</parameter>
    		</ResourceParams>
		<Resource name="jdbc/RealmDatasource" type="javax.sql.DataSource" scope="Shareable"/>
		<ResourceParams name="jdbc/RealmDatasource">
			<parameter>
				<name>username</name>
				<value>admin</value>
			</parameter>
			<parameter>
				<name>password</name>
				<value></value>
			</parameter>
			<parameter>
				<name>url</name>
				<value>jdbc:odbc:geode</value>
			</parameter>
			<parameter>
				<name>driverClassName</name>
				<value>sun.jdbc.odbc.JdbcOdbcDriver</value>
			</parameter>
			<parameter>
				<name>maxWait</name>
				<value>5000</value>
			</parameter>
			<parameter>
				<name>maxActive</name>
				<value>1</value>
			</parameter>
			<parameter>
				<name>maxIdle</name>
				<value>1</value>
			</parameter>
		</ResourceParams>
  	</GlobalNamingResources>

  
  	<!-- Define the Tomcat Stand-Alone Service -->
  	<Service name="Tomcat-Standalone">
    		<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
    		<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
               	port="8080" minProcessors="5" maxProcessors="75"
               	enableLookups="true" redirectPort="8443"
               	acceptCount="100" debug="0" connectionTimeout="20000"
               	useURIValidationHack="false" disableUploadTimeout="true" />
    

    		<!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
    		<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
               	port="8009" minProcessors="5" maxProcessors="75"
               	enableLookups="true" redirectPort="8443"
               	acceptCount="10" debug="0" connectionTimeout="0"
               	useURIValidationHack="false"
               	protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>

        
         
    		<!-- Define the top level container in our container hierarchy -->
    		<Engine name="Standalone" defaultHost="localhost" debug="0">      

      			<!-- Global logger unless overridden at lower levels -->
      			<Logger className="org.apache.catalina.logger.FileLogger" prefix="catalina_log."
suffix=".txt" timestamp="true"/>      

      			<!-- This Realm uses the UserDatabase configured in the global JNDI
           		resources under the key "UserDatabase".  Any edits
           		that are performed against this UserDatabase are immediately
           		available for use by the Realm.  -->
      			<Realm className="org.apache.catalina.realm.UserDatabaseRealm" debug="0" resourceName="UserDatabase"/>
                
      			<Realm className="org.apache.catalina.realm.DataSourceRealm" debug="0" dataSourceName="jdbc/RealmDatasource"
userTable="users" userNameCol="user_name" userCredCol="user_pass" userRoleTable="user_roles"
roleNameCol="role_name"/>

      
      

      			<!-- Define the default virtual host -->
      			<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="true">
      				<Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" append="true"
forwardAll="false" modJk="c:/apache/Apache2/modules/mod_jk-2.0.43.dll" />        
        			<Logger className="org.apache.catalina.logger.FileLogger" directory="logs" 
prefix="localhost_log." suffix=".txt" timestamp="true"/>

			        <Context path="/geode" docBase="geode" debug="0" reloadable="true">
			        	<Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_geode_log."
suffix=".txt"
			        	  timestamp="true"/>        	  
			        </Context>                        			
      			</Host>
    		</Engine>
  	</Service>
</Server>


tomcat/conf/jk/workers.properties :
---------------------------------------------
# BEGIN workers.properties
# Definition for Ajp13 worker
worker.list=ajp13
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
# END workers.properties


Thanks to take time to consider my problem.


> 
> Hi -
> 
> I try to avoid free individual support.  If you post your questions and 
> your config specifics to the list, someone will help you, and then at 
> least it will be in the archives for everyone else instead of just your 
> InBox and mine.
> 
> John
> 
> v.siguier wrote:
> 
> > Dear John,
> > 
> > All I do to configure Apache with Tomcat thanks to mod_jk is from your document
at http://www.johnturner.com/howto (NT platform)... is there a mail address where I can forward
you all config files (httpd.conf, server.xml...) ?
> > 
> > Regards
> > 
> > 
> > 
> > 
> >>or 3) dispensing with the mod_jk.conf method and modifying httpd.conf 
> >>manually to work in your environment.
> >>
> >>John
> >>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
------------------------------------------

Faites un voeu et puis Voila ! www.voila.fr 



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


Mime
View raw message