You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chris Baty <ba...@yahoo.com> on 2008/01/20 13:35:55 UTC

Only see html/code

Hi Guys,
I'm running  Tomcat 5.5 and Apache 2, with Tomcat connector (Kind of a newbie).  I got my Tomcat working fine at /usr/share/tomcat5.5-webapps/ROOT/cwrecyclers.  When I point the browser (locally) at localhost:8180/cwrecyclers/ I see exactly what I expect.  But when I look remotely also I see is the html.  I've looked at all my config files and they all look fine.  Could someone point me in the right direction?
Thanks
Chris

Apache:
<VirtualHost  67.207.133.158:80>
        ServerAdmin spazz@yougarage.tv
        ServerName  cwrecyclers.hopto.org
    
        # Indexes + Directory Root.
        DirectoryIndex index.jsp
        DocumentRoot /usr/share/tomcat5.5-webapps/ROOT/cwrecyclers/
#        DocumentRoot /var/www/cwrecyclers/

    JkMount /cwrecyclers/*.jsp cwrecyclers
    JkMount /cwrecyclers/* cwrecyclers


    # Globally deny access to the WEB-INF directory
     <LocationMatch ".*WEB-INF.*">
        deny from all
     </LocationMatch>


        # Logfiles
        ErrorLog  /var/log/apache2/cwrecyclers.hopto.org.error.log
        CustomLog /var/log/apache2/cwrecyclers.hopto.org.access.log combined
</VirtualHost>



workers.properties
# Tomcat and Java configuration
#
workers.tomcat_home=/usr/share/tomcat5.5
workers.java_home=/usr/lib/jvm/java-1.5.0-sun
ps=/
worker.list=yougarage

# Definition for local worker using AJP 1.3
#
worker.yougarage.type=ajp13
worker.yougarage.host=yougarage.tv
worker.yougarage.port=8009
worker.yougarage.cachesize=20

worker.list=cwrecyclers

# Definition for local worker using AJP 1.3
#
worker.cwrecyclers.type=ajp13
worker.cwrecyclers.host=cwrecyclers.hopto.org
worker.cwrecyclers.port=8009
worker.cwrecyclers.cachesize=20






      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

Re: Only see html/code

Posted by Martin Gainty <mg...@hotmail.com>.
Hi Chris

is your webserver is forwarding/redirecting or retunfing in the response
anything other than html?
if so could you display these pages and your configuration from web.xml

M--
----- Original Message -----
From: "Chris Baty" <ba...@yahoo.com>
To: <us...@tomcat.apache.org>
Sent: Sunday, January 20, 2008 7:35 AM
Subject: Only see html/code


> Hi Guys,
> I'm running  Tomcat 5.5 and Apache 2, with Tomcat connector (Kind of a
newbie).  I got my Tomcat working fine at
/usr/share/tomcat5.5-webapps/ROOT/cwrecyclers.  When I point the browser
(locally) at localhost:8180/cwrecyclers/ I see exactly what I expect.  But
when I look remotely also I see is the html.  I've looked at all my config
files and they all look fine.  Could someone point me in the right
direction?
> Thanks
> Chris
>
> Apache:
> <VirtualHost  67.207.133.158:80>
>         ServerAdmin spazz@yougarage.tv
>         ServerName  cwrecyclers.hopto.org
>
>         # Indexes + Directory Root.
>         DirectoryIndex index.jsp
>         DocumentRoot /usr/share/tomcat5.5-webapps/ROOT/cwrecyclers/
> #        DocumentRoot /var/www/cwrecyclers/
>
>     JkMount /cwrecyclers/*.jsp cwrecyclers
>     JkMount /cwrecyclers/* cwrecyclers
>
>
>     # Globally deny access to the WEB-INF directory
>      <LocationMatch ".*WEB-INF.*">
>         deny from all
>      </LocationMatch>
>
>
>         # Logfiles
>         ErrorLog  /var/log/apache2/cwrecyclers.hopto.org.error.log
>         CustomLog /var/log/apache2/cwrecyclers.hopto.org.access.log
combined
> </VirtualHost>
>
>
>
> workers.properties
> # Tomcat and Java configuration
> #
> workers.tomcat_home=/usr/share/tomcat5.5
> workers.java_home=/usr/lib/jvm/java-1.5.0-sun
> ps=/
> worker.list=yougarage
>
> # Definition for local worker using AJP 1.3
> #
> worker.yougarage.type=ajp13
> worker.yougarage.host=yougarage.tv
> worker.yougarage.port=8009
> worker.yougarage.cachesize=20
>
> worker.list=cwrecyclers
>
> # Definition for local worker using AJP 1.3
> #
> worker.cwrecyclers.type=ajp13
> worker.cwrecyclers.host=cwrecyclers.hopto.org
> worker.cwrecyclers.port=8009
> worker.cwrecyclers.cachesize=20
>
>
>
>
>
>
>
____________________________________________________________________________
________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Only see html/code

Posted by David Smith <dn...@cornell.edu>.
I know I'm coming into this whole thing late, but  this thread seems to 
have gone on for a while and I see a number of conflicts in your config 
that need to be addressed.  I'm assuming your cwrecyclers folder is a 
full webapp complete with WEB-INF folder and it's own web.xml file.  If 
it's just a folder of jsps in the ROOT webapp, then you still need to 
fix your DocumentRoot to be /usr/share/tomcat5.5-webapps/ROOT.

1. Don't try to put your webapp in the ROOT folder in tomcat's webapps 
directory.  Instead, it should be on the same level as the ROOT webapp.  
If it's your intent to make your cwrecyclers webapp the default webapp 
responding to requests for /, then delete the original ROOT webapp 
folder and rename cwrecyclers to ROOT.

2. Depending on how you dealt with no. 1, either change your JkMount or 
your DocumentRoot to line up the URL paths between tomcat and httpd.  If 
you renamed cwrecyclers to ROOT to make it the default webapp, 
DocumentRoot should be /usr/share/tomcat5.5-webapps/ROOT and JkMount 
should be /*.jsp.  If you decided to keep the cwrecyclers webapp name, 
then DocumentRoot needs to be /usr/share/tomcat5.5-webapps/cwrecyclers 
and the first JkMount is fine.  Remove the second one in either case.

--David

Chris Baty wrote:
> Hi Guys,
> I'm running  Tomcat 5.5 and Apache 2, with Tomcat connector (Kind of a newbie).  I got my Tomcat working fine at /usr/share/tomcat5.5-webapps/ROOT/cwrecyclers.  When I point the browser (locally) at localhost:8180/cwrecyclers/ I see exactly what I expect.  But when I look remotely also I see is the html.  I've looked at all my config files and they all look fine.  Could someone point me in the right direction?
> Thanks
> Chris
>
> Apache:
> <VirtualHost  67.207.133.158:80>
>         ServerAdmin spazz@yougarage.tv
>         ServerName  cwrecyclers.hopto.org
>     
>         # Indexes + Directory Root.
>         DirectoryIndex index.jsp
>         DocumentRoot /usr/share/tomcat5.5-webapps/ROOT/cwrecyclers/
> #        DocumentRoot /var/www/cwrecyclers/
>
>     JkMount /cwrecyclers/*.jsp cwrecyclers
>     JkMount /cwrecyclers/* cwrecyclers
>
>
>     # Globally deny access to the WEB-INF directory
>      <LocationMatch ".*WEB-INF.*">
>         deny from all
>      </LocationMatch>
>
>
>         # Logfiles
>         ErrorLog  /var/log/apache2/cwrecyclers.hopto.org.error.log
>         CustomLog /var/log/apache2/cwrecyclers.hopto.org.access.log combined
> </VirtualHost>
>
>
>
> workers.properties
> # Tomcat and Java configuration
> #
> workers.tomcat_home=/usr/share/tomcat5.5
> workers.java_home=/usr/lib/jvm/java-1.5.0-sun
> ps=/
> worker.list=yougarage
>
> # Definition for local worker using AJP 1.3
> #
> worker.yougarage.type=ajp13
> worker.yougarage.host=yougarage.tv
> worker.yougarage.port=8009
> worker.yougarage.cachesize=20
>
> worker.list=cwrecyclers
>
> # Definition for local worker using AJP 1.3
> #
> worker.cwrecyclers.type=ajp13
> worker.cwrecyclers.host=cwrecyclers.hopto.org
> worker.cwrecyclers.port=8009
> worker.cwrecyclers.cachesize=20
>
>
>
>
>
>
>       ____________________________________________________________________________________
> Be a better friend, newshound, and 
> know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Only see html/code

Posted by Rainer Jung <ra...@kippdata.de>.
Hi Chris,

Chris Baty schrieb:
> Hi Guys, I'm running  Tomcat 5.5 and Apache 2, with Tomcat connector
> (Kind of a newbie).  I got my Tomcat working fine at
> /usr/share/tomcat5.5-webapps/ROOT/cwrecyclers.  When I point the
> browser (locally) at localhost:8180/cwrecyclers/ I see exactly what I
> expect.  But when I look remotely also I see is the html.  I've
> looked at all my config files and they all look fine.  Could someone
> point me in the right direction? Thanks Chris

What the exact URL, you are testing with?
Is it a JSP? Is it an index.jsp, i.e. do you ask for a directory, which 
includes an index.jsp?

> 
> Apache:
> <VirtualHost  67.207.133.158:80>
>         ServerAdmin spazz@yougarage.tv
>         ServerName  cwrecyclers.hopto.org
>     
>         # Indexes + Directory Root.

Don't do this. It will not work reliably. Instead include index.jsp in 
the list of welcome files on your webapp web.xml.

>         DirectoryIndex index.jsp

Don't do this. Since you forward all cwrecyclers requests to Tomcat, 
Apache httpd does not need to know about the webapp directory.
>         DocumentRoot /usr/share/tomcat5.5-webapps/ROOT/cwrecyclers/
> #        DocumentRoot /var/www/cwrecyclers/
> 

The first Mount is already included in the second one.
>     JkMount /cwrecyclers/*.jsp cwrecyclers
>     JkMount /cwrecyclers/* cwrecyclers
> 
> 
If you don't tel httpd about the webapp with DocumentRoot, you can 
remove this as well.

>     # Globally deny access to the WEB-INF directory
>      <LocationMatch ".*WEB-INF.*">
>         deny from all
>      </LocationMatch>
> 
> 
>         # Logfiles
>         ErrorLog  /var/log/apache2/cwrecyclers.hopto.org.error.log
>         CustomLog /var/log/apache2/cwrecyclers.hopto.org.access.log combined
> </VirtualHost>
> 


> workers.properties
 > # Tomcat and Java configuration
 > #
Remove the next two, they are useless.
> workers.tomcat_home=/usr/share/tomcat5.5 
> workers.java_home=/usr/lib/jvm/java-1.5.0-sun ps=/

> worker.list=yougarage
> 
> # Definition for local worker using AJP 1.3
> # 
> worker.yougarage.type=ajp13
> worker.yougarage.host=yougarage.tv 
> worker.yougarage.port=8009

Remove cachesize, the default for Apache httpd are better:
> worker.yougarage.cachesize=20
> 
> worker.list=cwrecyclers
> 
> # Definition for local worker using AJP 1.3
> # 
> worker.cwrecyclers.type=ajp13 
> worker.cwrecyclers.host=cwrecyclers.hopto.org 
> worker.cwrecyclers.port=8009

Remove cachesize, the default for Apache httpd are better:
> worker.cwrecyclers.cachesize=20


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Only see html/code

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chris,

Chris Baty wrote:

[snip]

Did you mean to turn off the "cwrecyclers" worker? It's not listed in
the worker.list:

| worker.list=yougarage

??

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkeUtegACgkQ9CaO5/Lv0PBnVwCgqfCi0jFxlTHE9anrJYnWiFzz
pn8AnAqDSazuGPY/p1HG7s3DwMBjvTyq
=8Dtr
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org