tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jones, Stephen" <sjo...@rational.com>
Subject Proposed Server.xml Change (was RE: Bugzilla #512 is Bunk)
Date Thu, 01 Mar 2001 23:25:44 GMT
Right, but that is excruciating to configure and more excruciating to
maintain...

Why not use two copies of Tomcat, each with their own mod_jk.conf-auto which
can be included in the appropriate VirtualHost section?

Or better yet change the way server.xml works to something like this:

<Server>
	<ContextManager generate-config="mod-jk-secure.conf-auto" debug="0"
workDir="work" showDebugInfo="true">
		... secure contexts ...
	</ContextManager>
	<ContextManager generate-config="mod-jk.conf-auto" debug="0"
workDir="work" showDebugInfo="true">
		... non-secure contexts ...
	</ContextManager>
</Server>

Then we could map each ContextManager to one VirtualHost with one
auto-generated config file, and Include them from httpd.conf for each
VirtualHost accordingly?

The implementation would be simple, add the attribute to the ContextManager
XML tag, add it to the ContextManager object which is passed into
ApacheConfig.execute(ContextManager cm), and get the filename to generate
from the ContextManager object. This would minimize on hardcoded filenames,
as well.

Of course we would have to do something about the JkWorkersFile, JkLogLevel,
and JkLogFile directives. Perhaps these could be in a conditional block such
as <IfModule !mod_jk.c></IfModule> or some other Apache conditional
directive. There's got to be some way to separate out the global settings
from the ones which apply to only one ContextManager.

Just some ideas...
Steve

> -----Original Message-----
> From: GOMEZ Henri [mailto:hgomez@slib.fr]
> Sent: Thursday, March 01, 2001 2:54 PM
> To: tomcat-dev@jakarta.apache.org
> Cc: danmil@shore.net; jean-paul_abgrall@phoenix.com
> Subject: RE: Bugzilla #512 is Bunk
> 
> 
> The correct config for mod_jk is :
> 
> in httpd.conf :
> 
> JkWorkersFile /etc/httpd/conf/workers.properties
> JkLogFile 	/var/log/httpd/mod_jk.log
> # set it to error since warn just load to many apache
> JkLogLevel 	error	
> 
> for virtuals
> 
> <VirtualHost host1.com:80>
> 
> DocumentRoot	"/home/httpd/host1/html"
> 
> <Directory "/home/httpd/host1/html">
>     Options FollowSymLinks MultiViews
>     AllowOverride AuthConfig
>     Order allow,deny
>     Allow from all
> </Directory>
> 
> ServerName		host1.com
> ServerAdmin 	webmaster@host1.com
> 
> ErrorLog 		/home/httpd/host1/var/log/httpd/error_log
> TransferLog 	/home/httpd/host1/var/log/httpd/access_log
> 
> JkMount /app1/servlet/* workerhost1
> JkMount /app1/*.jsp workerhost1
> 
> </VirtualHost>                                  
> 
> <VirtualHost host1.com:443>
> 
> DocumentRoot 	"/home/httpd/host1/htmls"
> 
> <Directory "/home/httpd/host1/htmls">
>     Options FollowSymLinks MultiViews
>     AllowOverride AuthConfig
>     Order allow,deny
>     Allow from all
> </Directory>
> 
> Alias /usage/ "/home/httpd/host1/usage/"
> 
> <Directory "/home/httpd/host1/usage">
> 	Options Indexes MultiViews
> 	AllowOverride None
> 	Order allow,deny
> 	Allow from all
> </Directory>
> 
> ServerName 		host1.com
> ServerAdmin 	webmaster@host1.com
> 
> ErrorLog 		/home/httpd/host1/var/log/httpd/error_log
> TransferLog 	/home/httpd/host1/var/log/httpd/access_log
> 
> SSLEngine on
> SSLCipherSuite
> ALL:!ADH:!EXP56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
> SSLCertificateFile
> /home/httpd/host1/etc/httpd/conf/ssl.crt/host1.com-server.crt
> SSLCertificateKeyFile
> /home/httpd/host1/etc/httpd/conf/ssl.key/host1.com-server.key
> 
> <Files ~ "\.(cgi|shtml|phtml|php3?)$"> 
> 	SSLOptions +StdEnvVars 
> </Files>
> 
> <Directory "/home/httpd/cgi-bin">
> 	SSLOptions +StdEnvVars 
> </Directory>
> 
> SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
> downgrade-1.0 force-response-1.0
> CustomLog /home/httpd/host1/var/log/httpd/ssl_request_log "%t %h
> %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
> 
> JkMount /secureapp1/servlet/* workerhost1
> JkMount /secureapp1/*.jsp workerhost1
> 
> </VirtualHost>
> 
> .....
> 
> Note the way to use SSL in this case to use secureapp1 webapp ;-)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-dev-help@jakarta.apache.org
> 

Mime
View raw message