473,385 Members | 1,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Apache to Tomcat forwarding not working properly

Hi,


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.

https://IP/
http://IP:8080/abc

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)

http://IP:8080/abc/implement (Works perfectly. Login page with logo)
http://IP:8080/abc/implement/abc/images/logo_login.gif (Login page with logo. I had no idea what this would display but at least I did not imagine that it would display ‘login + image’)
http://IP:8080/abc/abc/images/logo_login.gif (Shows ONLY logo as it ideally should)


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
Attached Images
File Type: jpg Login page with blank image.JPG (9.5 KB, 205 views)
May 3 '10 #1
1 3144
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.


Regards,
GC
May 6 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: ptaz | last post by:
Hi I'm trying to run a web page but I get the following error. Ca anyone please tell me a solution to this. Thanks Ptaz HTTP Status 500 - type Exception report
2
by: mukhesh | last post by:
Could somebody tell me if Apache tomcat supports .NET. If so, Some sources to the info would be great. Mukhiya
4
by: JNeko | last post by:
Hello all! I am starting to do a little reviewing of my JSP, but first I would like to get my servlet container working! Now, it's been a while sinced I configured and used Tomcat, so I used this...
31
by: ajos | last post by:
hi frnds, i have a form,which has 2 input text boxes, the values are entering the text boxes,when i leave the 2 text boxes blank and hit submit a java script gives the message that the 2 fields are...
0
by: rugman | last post by:
Hi. Let me immediately declare - I'm a designer/owner of a website written in jsp pages running under Apache Tomcat 5.5.25. I make simple changes to code but don't understand much about...
0
ak1dnar
by: ak1dnar | last post by:
Hi Guys, I am using a virtual private server which runs Linux OS in it. On the server Apache and Tomcat has installed and to the best of my knowledge mod_jk also installed and working perfectly. In...
1
by: barunva | last post by:
Hi, We would like to know whether the Clustering and Load balancing features of Apache tomcat server are working across the Clusters or not. If it is working, is it possible to...
1
anurag275125
by: anurag275125 | last post by:
Hello all, I am trying to install Apache-tomcat-6.0.24 on Redhat Linux system. But I'm facing some problems. After unpacking the "apache-tomcat-6.0.24-src.tar.gz" file in /home/anurag folder....
0
xploreraj
by: xploreraj | last post by:
I can not run Apache Tomcat for servlets. Normal Java programs are running. I have installed the JDK (jdk1.6.0_18 & jre6) & Tomcat 5.5 properly. The port no. for Tomcat is 8080. I don't think any...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.