473,725 Members | 2,197 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Handling redirection with mod_jk

1 New Member
Hello,

I have Apache connected with Tomcat using mod_jk (all latest versions)

Everything is working fine, except when my Tomcat application sends a redirection response.

My app is in installed in the "/app1" context in Tomcat.

In my httpd.conf file, I have the following configuration:

<VirtualHost 127.0.0.1:80>
ServerName app1.localhost
RewriteEngine on

RewriteCond %{REQUEST_URI} !^/app1/
RewriteRule ^(.*) /app1$1 [PT,L]
JkMount /* localhost

</VirtualHost>


So essentlly I am forwarding all requests to
http://app1.localhost
to
/app1 context in the Tomcat.

For example:

http://app1.localhost/index.jsp
will be forwarded as
http://app1.localhost/app1/index.jsp
to Tomacat.

Now, my index.jsp redirects the request to welcome.jsp

This is where the problem occurs.

The URL sent back to the browser is

http://app1.localhost/app1/welcome.jsp

Whereas the browser should receive

http://app1.localhost/welcome.jsp


Of course, this problem can be solved using ProxyPass & ProxyPassRevers e.

However, I am interested to know if we can do something similar with mod_jk ?

I've tried using just ProxyPassRevers e with mod_jk, but it doesnt work .

Any help/suggestions would be very valuable.

Thanks,
Romil Jain
Mar 5 '08 #1
0 1981

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

Similar topics

111
14409
by: Retlak | last post by:
The recommended (on dozens of websites) and effective (works in Netscape, MSIE, Mozilla, probably others) way to detect if a browser has Javascript turned off is to put this in the <head>: <noscript> <meta http-equiv="refresh" content="1;url=http://yourURL/nojscript.html"> </noscript> This redirects to a doc which typically says "You need to enable
3
2056
by: Mr Newbie | last post by:
I'm testing error handling configurations and having some trouble. I created a WebForm called. ErrDefault.aspx and I am trying to use the Page error attribute to force the redirection to a custom page, but I only get and unhandled exception page and it does not direct me to my specific page. I'm probably doing something really stupid, but I cant see what . Any Ideas ? - Thanx Mr N --------- DETAILS BELOW -----------
21
2269
by: sanjaymeher | last post by:
Hi, Right now addDynamicMemory(char **ptr, int size) method can able to handle if input ptr is intitialized to NULL or something. But how to improve this method to handle uninitialized pointed even. Any Answer ?? Thanks, Sanjay
5
4943
by: KinnarSen | last post by:
Hi I am new to APACHE , TOMCAT arena . For my application i need to install Apache with mod_jk support so that it can connect with a standalone Tomcat server. I am following the instruction of installation but the problem i am facing is whenever i am making the change in the httpd.conf file to load the mod_jk.so module it is gving me the error Cannot Load module ........ APACHE is SSL enabled . Any hlep will be highly appreciated ...
0
2246
by: harisankar22 | last post by:
Hi All, I am trying to configure a load balancer environment with mod_jk and tomcat workers. I have 2 applications app1 deployed on a set of servers, and app2 deployed on another set of servers. Can I use a single load balancer to balance load among two types of application?? ie all request to app1 should go to servers where app1 is deployed and requests to app 2 should go to set of servers where app 2 is deployed. Is this possible??...
0
3380
by: koolestj | last post by:
I am trying to understand why a server restart would cause mod_jk to not find a worker. I checked all tomcat workers were running and I was able to telnet to the ajp port on each app server. Just to give background I have 1 web server that is running apache with mod_jk for load balancing. The apache web server is configured to run as a Service and is setup to run Automatically. I have 5 tomcat workers (app engines) that serve http requests...
0
2713
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 other words Apache is on Port and 80 and Tomcat is on 8080. but when I type http://mydomain.com/MyWebContext/a_file_name.jsp I can see the jsp pages inside tomcat webapps Dir, and If I need to access my phpmyadmin app which is inside Apache doc...
1
4648
by: sonalijpawar | last post by:
Hello everybody, I am trying to configure Apache with Tomcat for standalone apache it get succeed.But I want to configure MS4W with Tomcat.MS4W have its own apache server and i want to configure that apache server with tomcat. I reffer steps which is available on net.But when I add following line into htpd.conf Include "C:/Program Files/Apache Software Foundation/Tomcat 6.0/conf/auto/mod_jk.conf" it will give me error like below ...
0
1791
by: ziycon | last post by:
Does anyone know if proxy pass would affect mod_jk if both where setup to remove the port 8080 at the end of links? What type of problems would you expect?
0
8752
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9176
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6702
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3221
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2635
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2157
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.