Hi James,

tsaojk schrieb:
> Hi Folks, 
> 
> I am experiencing an rather odd issue with mod_jk not forwarding from Apache
> to Tomcat for my web application. Basically, I have configured mod_jk to
> forward everything under a webapp to Tomcat and things are working fine for
> 'regular' URI's
> 
> e.g. http://www.myhost.com/myApp/loginServletMapping
> 
> will work fine (request is forwarded to Tomcat). Problem arises when I have
> a hyperlink in the body of an email that access a servlet in the same
> webapp, where the hyperlink url is in the form
> 
> http://www.myhost.com/myApp/goToServlet/S325/http%3A%2F%2Fwww.abc.com
> 
> where I will get a 404 not found page returned by Apache when clicked. I
> have monitored the mod_jk logs and the Tomcat logs and I am sure nothing
> gets passed on when the above URL is being requested. I have done further
> tests and foud that if I include anything with %3A%2F%2F (://) as part of
> the path in the URI, then mod_jk will not forward.
> 
> Any pointers as to where I have gone wrong and is this a security design on
> mod_jk's part? Have googled around for 2 days without much luck.
> 
> As a control test, I tried accessing the page directly with Tomcat using
> http://www.myhost.com:8080/myApp/goToPage/S325/http%3A%2F%2Fwww.abc.com, it
> will correctly as intended.

See

http://httpd.apache.org/docs/2.2/mod/core.html#allowencodedslashes

> Here is my mod_jk config in httpd.conf
> 
> JkWorkersFile /usr/local/apache2/conf/extra/workers.properties
> JkLogFile     "|/usr/local/apache2/bin/rotatelogs /var/log/httpd/mod_jk.log
> 86400"
> JkLogLevel    error

"info" gives sometimes helpful additional information, whenever errors
occur. As long as only info output occurs, everything is fine.

> JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "

Drop it, Default is usually better, e.g. contains milliseconds.

> JkOptions     +ForwardKeySize +ForwardURIProxy -ForwardDirectories

See below.

> JkRequestLogFormat     "%w %V %T"

You should include you JK access log in the usual access log using the
JK notes entries. See "mod_log_config" on page
http://tomcat.apache.org/connectors-doc/reference/apache.html.

> JkShmFile    /var/log/httpd/jk.shm
> JkShmSize    256
> 
> [below is contained within a VirtualHost directive ...]
> 
> JkMount /myApp/* w2
> 
> Incidentally, for the JkOption, I have tried using ForwardURIProxy,
> ForwardURICompat, ForwardURICompatUnparsed and ForwardURIEscaped to no
> avail.

Default should be fine for 1.2.26.

> I am running Apache 2.2.8 and Tomcat 5.5.26 with mod_jk 1.2.26 on Ubuntu
> 6.06

Regards,

Rainer


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

Reply via email to