LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-23-2011, 03:26 PM   #1
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Rep: Reputation: 39
how to do auto redirection of a tomcat application


I have a site http://mysite.com
right now what you are seeing is a default Tomcat6 page.
I am using mod_ajp as a front end and Apache vhost configuration for same is
Code:
<VirtualHost *:80 >

        ServerName mysite.com
        ServerAdmin webmaster@localhost

        ProxyRequests off
        <Proxy *>
        Order deny,allow
        Allow from all
        </Proxy>
        ProxyPreserveHost On

        ProxyPass / ajp://192.168.1.19:8009/
        ProxyPassReverse / ajp://192.168.1.19:8009/


</VirtualHost>



How ever I have an application running on it
http://mysite.com/olat
what I want to do is when some one opens
http://mysite.com
then rather than seeing Tomcat6 home page from
/var/lib/tomcat6/webapps/ROOT/index.html
the person is redirected to olat application which is in
/var/lib/tomcat6/webapps/olat
how can this be achived?
The computer where OLAT (http://mysite.com/olat) is hosted is physically different from where the above apache2 configuration is.

Last edited by tkmsr; 02-23-2011 at 11:32 PM.
 
Old 02-23-2011, 04:02 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
so don't you just want to add "olat/" onto the end of the ProxyPass directives? i.e. move everything up by one level?
 
Old 02-23-2011, 11:31 PM   #3
tkmsr
Member
 
Registered: Oct 2006
Distribution: Ubuntu,Open Suse,Debian,Mac OS X
Posts: 798

Original Poster
Rep: Reputation: 39
Ok I have found a solution to this problem mentioning so that if some one comes across here
what I did to get it working was deleted
Quote:
/var/lib/tomcat6/webapps/ROOT
and renamed my application
Quote:
/var/lib/tomcat6/webapps/olat
to
Quote:
/var/lib/tomcat6/webapps/ROOT
and removed the olat.war from
Quote:
/var/lib/tomcat6/webapps/
then restarted tomcat6
Code:
/etc/init.d/tomcat6 restart
and I could see auto redirection happening.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tomcat application monitoring tikit Linux - Software 2 01-27-2011 02:43 AM
Apache Server redirection to Tomcat??? ajeetraina Linux - Server 0 05-13-2008 05:54 AM
Web application: cocoon jsp/servlet tomcat all in web application adilturbo Programming 0 11-24-2007 06:00 PM
How to do with Tomcat application? treotan Linux - General 2 07-20-2007 04:59 AM
Strange Apache/Tomcat Redirection... ddenton Linux - Software 2 06-27-2007 04:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:05 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration