I am facing some problem with Apache to Tomcat forwarding. I have Tomcat (6.0.18) behind Apache (2.2). I want to use ‘https’ for receiving request from the client. This request, when forwarded by Apache to Tomcat, will use ‘http’. My application’s name is ‘abc’, which is deployed in Tomcat’s webapps dir. Both Tomcat & Apache are on the same machine. There is one more requirement: When a user just types the IP, it should, by default, forward it to the application’s (abc) login page i.e., both the below mentioned URL’s should point to the same page.
I added the following lines in the httpd.conf file:
-----------------------------------------------------
ProxyPass /abc http://IP:8080/abc/implement ProxyPass / http://IP:8080/abc/implement -----------------------------------------------------
Now there are two issues:
-----------------------------------------------------
1. When I try to use the https URL (https://IP/), it opens up the login page but the images are not visible. If I try the http one (http://IP:8080/abc/), then the page works fine.
I thought of using the blank (appearing so) image’s URL (https://IP/abc/abc/images/logo_login.gif >>> abc 2 times is not a typo; the deployed directory’s name is ‘abc’ & there is a dir named ‘abc’ inside ‘abc’) and see where it’s pointing to. When I tried accessing it, it too was pointing to the same login page where http://IP:8080/abc/ OR https://IP/ are pointing.
These are few results that might help you to understand my problem:
https://IP/ (No logo; only the login page)
https://IP/abc/abc/images/logo_login.gif (No logo; only the login page)
(I have also noticed that whatever I append in the https URL after https://IP/abc/ it takes me to the login page with no image)
2. If we use IE6 to open https URL, then a warning box pops-up before the login page appears (without images). This behavior is absent in IE8.
The warning message states “line 56 Object expected”.
-----------------------------------------------------
Can anyone please guide me?
Regards,
GC
G Chhabra
Greenhorn
Joined: May 03, 2010
Posts: 3
posted
0
Hi,
I am now able to see image as well on the login page. My new ProxyPass settings are:
------------------------------------------
ProxyPass /abc/abc/images http://IP:8080/abc/abc/images ProxyPass /abc http://IP:8080/abc/implement ProxyPass / http://IP:8080/abc/implement ------------------------------------------
Please don't get confused with the 2 abc mentioned above in thr URL; one is the deployed application's dir name and the following abc is a dir just inside it.
Now the problem I am facing is that when I try to access either 'https://IP' or 'https://IP/abc', I see some a yellow icon at the bottom left of my browser. On clicking it, it says
-------------------------------------------
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Tue, 4 May 2010 09:22:02 UTC
Message: Object expected
Line: 57
Char: 2
Code: 0
URI: https://IP/csa -------------------------------------------
Also, when I enter inside the login page, I don't get a proper page; instead I see the actual code written on the browser's screen.
On the other hand, if I try the 'http' URL (http://IP:8080/abc/implement), everything works fine without any error message, anywhere. Looks like there is still some problem with my Apache to Tomcat communication.