Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
http, https, shared, and deployment

http, https, shared, and deployment

2004-01-25       - By Dean A. Hoover

 Back
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 webmaster@(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 webmaster@(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 Source code of 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 Source code of 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 Source code of 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: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)




©2008 junlu.com - Jax Systems, LLC, U.S.A.