Suppose I want to create a website that has some dynamic content (served by tomcat) and some static content (served by apache). Also suppose that some of the pages on my website need to be https and some of the pages need to be http. Some stuff is shared (both http and https), like the logo GIF and css files.
I have figured a way to do this "by hand", and am interested in comments on this approach. I am also interested in how one would go about deploying such a website, using ant. Maybe some more ideas on directory layout, if you have any.
Thanks. Dean Hoover
Here's what I am currently doing "by hand" (foo.com is obviously fictituous):
httpd.conf: ... #------------------------------------------------------------------------------ <VirtualHost *:80> ServerAdmin [EMAIL PROTECTED] ServerName www.foo.com ServerAlias foo.com DocumentRoot /home/tomcat/foo.com/http ErrorLog /home/tomcat/foo.com/logs/error_log CustomLog /home/tomcat/foo.com/logs/access_log common <IfModule mod_jk.c> JkMount /*.jsp foo-http </IfModule>
Alias /images/ /home/tomcat/foo.com/images/
<Location /*/WEBINF/*> AllowOverride None Deny from all </Location> </VirtualHost> #------------------------------------------------------------------------------ <VirtualHost *:443> ServerAdmin [EMAIL PROTECTED] ServerName www.foo.com ServerAlias foo.com DocumentRoot /home/tomcat/foo.com/https ErrorLog /home/tomcat/foo.com/logs/error_log CustomLog /home/tomcat/foo.com/logs/access_log common <IfModule mod_jk.c> JkMount /*.jsp foo-https </IfModule>
Alias /images/ /home/tomcat/foo.com/images/
<IfModule mod_ssl.c> SSLEngine on SSLCertificateFile /home/tomcat/foo.com/foo.com.pem </IfModule> </VirtualHost> ...
workers.properties: ps=/ workers.tomcat_home="/usr/jakarta-tomcat" workers.java_home="/usr/java/j2sdk1.4.2"
worker.list=foo-http,foo-https
worker.foo-http.port=8009 worker.foo-http.host=localhost worker.foo-http.type=ajp13
worker.foo-https.port=8010 worker.foo-https.host=localhost worker.foo-https.type=ajp13
server.xml: <Server port="8005" shutdown="SHUTDOWN" debug="0"> <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" modJk="/usr/lib/httpd/modules/mod_jk.so" workersConfig="/usr/local/jakarta-tomcat/conf/jk/workers.properties" jkLog="/usr/local/jakarta-tomcat/logs/mod_jk.log" jkDebug="info"/> <Service name="foo-http"> <Connector className="org.apache.ajp.tomcat4.Ajp13Connector" address="127.0.0.1" port="8009" minProcessors="5" maxProcessors="75" enableLookups="false" acceptCount="10" debug="0"/>
<Engine name="standalone" debug="0" defaultHost="foo.com"> <Logger className="org.apache.catalina.logger.FileLogger" prefix="catalina_log." suffix=".txt" timestamp="true"/> <Host name="foo.com" debug="0" unpackWARs="true"> <Context path="" docBase="/home/tomcat/foo.com/http" debug="0" reloadable="true" /> </Host> </Engine> </Service>
<Service name="foo-https"> <Connector className="org.apache.ajp.tomcat4.Ajp13Connector" address="127.0.0.1" port="8010" minProcessors="5" maxProcessors="75" enableLookups="false" acceptCount="10" debug="0"/>
<Engine name="standalone" debug="0" defaultHost="foo.com"> <Logger className="org.apache.catalina.logger.FileLogger" prefix="catalina_log." suffix=".txt" timestamp="true"/> <Host name="foo.com" debug="0" unpackWARs="true"> <Context path="" docBase="/home/tomcat/foo.com/https" debug="0" reloadable="true" /> </Host> </Engine> </Service>
</Server>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]