Hehe, sorry, Juan.

Yeah, the same document root was a copy/paste.

> >  It does work, but forces me to go in by hand and change multiple 
> > virtual
> host entries if
> > I need to change any structure here.
> 
> mmhh, I don't get your point here, can you clarify?

Basically, since I have multiple virtual host listings that should
behave in the same way, that means I need to go into every virtual host
listing and add the same tags to each one over and over again.  But I
guess this is no different than if I continued to make these changes via
server.xml since the entries in there have to match your virtual host
listings in httpd.conf anyway.  For example:

<VirtualHost mydomain.com>
    ServerAdmin [EMAIL PROTECTED]
    DocumentRoot "/usr/local/apache2/htdocs"
    ServerName mydomain.com:80
    ErrorLog logs/error_log
    CustomLog logs/access_log common

## Stuff I kludged
    Alias /examples "/usr/local/tomcat/webapps/examples"

    <Directory "/usr/local/tomcat/webapps/examples">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp
    </Directory>

    Alias /juan "/usr/local/tomcat/webapps/examples/juan"

    <Directory "/usr/local/tomcat/webapps/examples/juan">
        Options Indexes FollowSymLinks
        DirectoryIndex index.html index.htm index.jsp
    </Directory>

    <Location "/examples/WEB-INF/*">
        AllowOverride None
        deny from all
    </Location>

    <Location "/examples/META-INF/*">
        AllowOverride None
        deny from all
    </Location>

    JkMount /examples/jsp/security/protected/j_security_check  ajp13
    JkMount /examples/snoop  ajp13
    JkMount /examples/servlet/*  ajp13
    JkMount /examples/CompressionTest  ajp13
    JkMount /examples/*.jsp  ajp13
    JkMount /examples/servletToJsp  ajp13
    JkMount /examples/SendMailServlet  ajp13
</VirtualHost>

You can see that I added the "juan" directory, but if I want all virtual
hosts to pick that up I'll need to repeat that for every virtual host
tag.  Like I said, this is no different than what I would be doing if I
stuck with adding this in server.xml then trying to include it, so I
guess this is the way to go.  I think I'll stick with this method.  It
makes starting these on boot easier anyway since I don't need to delay
Apache after the tomcat startup.

Thanks!

Bill

---------
Bill Saez
MS:  [EMAIL PROTECTED]
AIM: billservo
ICQ: 3272990
Y!:  billservo2



> -----Original Message-----
> From: Juan Nin [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, July 23, 2003 8:58 AM
> To: Tomcat Users List
> Subject: Re: My Tomcat + Apache + mod_jk HOWTO
> 
> 
> From: "Bill Saez" <[EMAIL PROTECTED]>
> 
> 
> > Tim,
> 
> Tim or Juan?  :oP
> 
> > #My production site
> > <VirtualHost mydomain.com>
> >     ServerAdmin [EMAIL PROTECTED]
> >     DocumentRoot "/usr/local/apache2/htdocs"
> >     ServerName mydomain.com:80
> >     ErrorLog logs/error_log
> >     CustomLog logs/access_log common
> > </VirtualHost>
> >
> > #My dev site
> > <VirtualHost localhost>
> >     ServerAdmin [EMAIL PROTECTED]
> >     DocumentRoot "/usr/local/apache2/htdocs"
> >     ServerName localhost:80
> >     ErrorLog logs/error_log
> >     CustomLog logs/access_log common
> > </VirtualHost>
> 
> you have the same DocumentRoot in both.. is this ok, or you 
> just copied it wrong?
> 
> > This worked.
> 
> ok
> 
> >However when I pulled in the contents of mod_jk.conf it
> > killed my document root.
> 
> mmhhh... are you including the contents before your 
> VirtualHosts definitions? probably there's something 
> conflicting between both of them, check out you're not 
> redefining anyhting..
> 
> >I ended up trying to pull the contents of some
> > of the virtual host listings from mod_jk.conf directly and 
> put it into  
> >the virtual host tags in httpd.conf.  So far this seems like it will
> > work- I can preserve my document root and still serve up jsp and  
> >servlets.
> 
> that's ok then
> that's how I ended doing it, if you check my httpd.conf file 
> in my HOWTO and if you check the resources links, there's a 
> link to a mail by John Turner where he showed his conf, and 
> he did it that way too
> 
> > Is this the "right" way to do this?
> 
> in this scenario I don't think there's one right or wrong way 
> the right one for you, should be the one it works for you, 
> and that it's easier for you I put everything in my 
> httpd.conf file because I see it more tidy, and it lets me 
> see things clear all in one file, without having to edit 
> another file, I don't see much sense in having another 
> file... maybe another person sees that way more tidy since it 
> includes Tomcat related things or VirtualHost in another 
> file.. use what you liie more, and works for you  :)
> 
> >  It does work, but forces me to go in by hand and change multiple 
> > virtual
> host entries if
> > I need to change any structure here.
> 
> mmhh, I don't get your point here, can you clarify?
> 
> regards,
> 
> Juan
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to