You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Raoon Kundi <rk...@ti.com> on 2002/09/30 21:01:46 UTC
Static content via AJP (specifically mod-jk2)
Hi,
Tomcat serves *.html's (static content) fine in the stand alone
mode but the same does not happen when a static file is requested
through apache using the mod-jk2
I have the following setup ...
Apache 1.3.26
Tomcat 4.1.12
Solaris 6
More details are as follows ...
when accessing stuff on the tomcat side via the AJP connector
e.g., a URL of the form http://localhost/myContext/myfile.html
I get a 404 error from apache. Seems like the connector is
not validating the request -- or something. Other requests to
the same server but with *.jsp extensions do however work.
E.g., a URL of the form http://localhost/myContext/myfile.jsp
will work just fine.
Here is my workers2.properties ...
[shm]
#file=${serverRoot}/logs/shm.file
file=/opt/apache/logs/shm.file
size=1048576
# Example socket channel, override port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1
# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
[uri:/myContext/*]
worker=ajp13:localhost:8009
#[uri:/myContext/*.html] <---- This did not work ...
#worker=ajp13:localhost:8009
# Map /jkstatus to the status worker.
# define the worker
[status:status]
# Uri mapping
[uri:/jkstatus/*]
worker=status:status
[logger]
file=/opt/apache/logs/mod_jk2.log
If serving static content is not possible over the jk2 connector
I would like to know the reasoning behind it.
Thanks in advance ...
Regards,
--
Raoon Kundi
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Static content via AJP (specifically mod-jk2)
Posted by Mike Jackson <mj...@cdi-hq.com>.
When you use tomcat and apache what is supposed to happen is
that tomcat services the jsp/servlet and apache services the
"static" requests. IE the html pages and graphics...
What it looks like to me is that you're configuration in the
mod_jk file isn't right, check to make sure that you have a
mapping for the proper directories so that apache can find
the html and other files.
--mikej
-=-----
mike jackson
mjackson@cdi-hq.com
> -----Original Message-----
> From: Raoon Kundi [mailto:rkundi@ti.com]
> Sent: Monday, September 30, 2002 12:02 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Static content via AJP (specifically mod-jk2)
>
>
> Hi,
>
> Tomcat serves *.html's (static content) fine in the stand alone
> mode but the same does not happen when a static file is requested
> through apache using the mod-jk2
>
> I have the following setup ...
>
> Apache 1.3.26
> Tomcat 4.1.12
> Solaris 6
>
> More details are as follows ...
>
> when accessing stuff on the tomcat side via the AJP connector
> e.g., a URL of the form http://localhost/myContext/myfile.html
> I get a 404 error from apache. Seems like the connector is
> not validating the request -- or something. Other requests to
> the same server but with *.jsp extensions do however work.
> E.g., a URL of the form http://localhost/myContext/myfile.jsp
> will work just fine.
>
> Here is my workers2.properties ...
>
> [shm]
> #file=${serverRoot}/logs/shm.file
> file=/opt/apache/logs/shm.file
> size=1048576
>
> # Example socket channel, override port and host.
> [channel.socket:localhost:8009]
> port=8009
> host=127.0.0.1
>
> # define the worker
> [ajp13:localhost:8009]
> channel=channel.socket:localhost:8009
>
> [uri:/myContext/*]
> worker=ajp13:localhost:8009
>
> #[uri:/myContext/*.html] <---- This did not work ...
> #worker=ajp13:localhost:8009
>
> # Map /jkstatus to the status worker.
> # define the worker
> [status:status]
>
> # Uri mapping
> [uri:/jkstatus/*]
> worker=status:status
>
> [logger]
> file=/opt/apache/logs/mod_jk2.log
>
>
> If serving static content is not possible over the jk2 connector
> I would like to know the reasoning behind it.
>
> Thanks in advance ...
>
> Regards,
> --
> Raoon Kundi
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>