|
|
FAQ and Trouble Shooting
Any questions and comments are welcome to me.
Index:
Q: How can I handle the request to the virtual hosts on Apache?
A: The mapping of the path of the request URI to the context can be done by 'ApJServMount' directive, normaly in jserv.conf(or tomcat.conf) which is specified by 'Include' directive' appended to 'httpd.conf'. For example, with
ApJServMount /examples ajpv12://jun_tomcat:8007/examplesthe request such as
<VirtualHost 205.205.150.103>
DocumentRoot /export/home/jun/public_html
ServerName www.juntest.com
ErrorLog logs/juntest.com-error_log
CustomLog logs/juntest.com-access_log common
<IfModule mod_jserv.c>
ApJServMount /examples ajpv12://jun_tomcat:8007/examples
<Location /examples/WEB-INF/ >
AllowOverride None
deny from all
</Location>
</IfModule>
</VirtualHost>
Q: I complied mod_jserv by APXS into the Apache, which is complied with mod_ssl. When Apache starts up with SSL (by 'apachectl sslstart'), JServ fails to start JVM once. After that JServ tries to start JVM again and again between some time interval and finally it succeed. Without SSL (by 'apachectl start'), there is no problem.
A: It is due to the heavy tasks to enable mod_ssl. To avoid this, change the order of the modules to be loaded. In case that mod_jserv is the last module to be loaded, the conflicts with mod_ssl will not occur. Just edit 'httpd.conf' so as to the lines of
LoadModule jserv_module libexec/mod_jserv.so LoadModule vhost_alias_module libexec/mod_vhost_alias.so ---- ---- ClearModuleList AddModule mod_jserv.c AddModule mod_vhost_alias.cNote that the order to be loaded is reverse to the order in 'httpd.conf'.
Q: For some reason, my Apache does not support DSO. How can I compile JServ into Apache statically?
A: To compile JServ into Apache statically, we first compile C source files of JServ module. Then we should put compiled files into the Apache source tree. Now Apache can be re-compiled with JServ statically.
The most difficult thing is to compile C source files of JServ. As you know, C is dependent on the environment. This means we must supply the appropriate command line option. But don't worry. The "configure" tool take care of all the tasks! Such a cool "configure" tool is included in the source distirbution of the original JServ, not in the source distribution of Tomcat.
Visit:
./configure \
--prefix=/usr/local/jserv \
--with-apache-src=/opt/local/src/apache_1.3.12 \
--with-JSDK=/opt/local/jakarta-tomcat/lib/servlet.jar
The options above mean:
cd /opt/local/src/apache_1.3.12
./configure \
--prefix=/usr/local/apache_1.3.12 \
--activate-module=src/modules/jserv/libjserv.a
make
make install
Java and all Java-based trademarks and logos are trademarks or registered of Sun Microsystems, Inc. in the United States and other countries.
|
|
ALL CONTENTS COPYRIGHT 2000, Jun Inamori. All rights reserved.
Any questions and comments are welcome to
Jun Inamori
.