You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by James Godrej <ja...@yahoo.in> on 2011/02/23 22:18:33 UTC

[users@httpd] how to set auto redirection in apache with tomcat


I have a site http://social.openitup.in
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 

<VirtualHost *:80 >

        ServerName social.openitup.in
        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://social.openitup.in/olat
what I want to do is when some one opens 
http://social.openitup.in
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 achieved?



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] how to set auto redirection in apache with tomcat

Posted by James Godrej <ja...@yahoo.in>.
Hi Igor I had tried that
ProxyPass / ajp://192.168.1.20:8009/olat
but that had not worked.
Let me know if I understood you correctly.




________________________________
From: Igor Cicimov <ic...@gmail.com>
To: users@httpd.apache.org
Sent: Thu, 24 February, 2011 12:37:29 PM
Subject: Re: [users@httpd] how to set auto redirection in apache with tomcat


If you read carefuly my email you will notice that  its different from what you 
tried and thats why it didnt work.
Sent from my phone
On Feb 24, 2011 4:55 PM, "James Godrej" <ja...@yahoo.in> wrote:
>
>
>Hi Igor,
>thanks for message I had tried.I just came across a trick which did the job.
>I had 
>hat I did to get it working was deleted
>/var/lib/tomcat6/webapps/ROOTand renamed my application
>/var/lib/tomcat6/webapps/olatto
>/var/lib/tomcat6/webapps/ROOTand removed the olat.war from
>
>
>
>/var/lib/tomcat6/webapps/ then restarted tomcat6
>
>
>/etc/init.d/tomcat6 restartand I could see auto redirection happening.
>Here I would like to mention I did not changed the original vhost which I posted 
>in my first question and ProxyPass /olat ajp://192.168.1.5:8009/olat
>had not worked.But this trick which I mentioned above did the job.Mentioning 
>here so that it helps some one else.
>
________________________________
From: Igor Cicimov <ic...@gmail.com>
>To: users@httpd.apache.org
>Sent: Thu, 24 February, 2011 3:32:37 AM
>Subject: Re: [users@httpd]  how to set auto redirection in apache with tomcat
>
>Does this work?         ProxyPass / ajp://192.168.1.19:8009/olat       
> ProxyPassReverse / ajp://19...
>


Re: [users@httpd] how to set auto redirection in apache with tomcat

Posted by Igor Cicimov <ic...@gmail.com>.
If you read carefuly my email you will notice that  its different from what
you tried and thats why it didnt work.

Sent from my phone

On Feb 24, 2011 4:55 PM, "James Godrej" <ja...@yahoo.in> wrote:

Hi Igor,
thanks for message I had tried.I just came across a trick which did the job.
I had
hat I did to get it working was deleted

/var/lib/tomcat6/webapps/ROOT
and renamed my application

/var/lib/tomcat6/webapps/olat
to

/var/lib/tomcat6/webapps/ROOT
and removed the olat.war from

/var/lib/tomcat6/webapps/
then restarted tomcat6

/etc/init.d/tomcat6 restart

and I could see auto redirection happening.
Here I would like to mention I did not changed the original vhost which I
posted in my first question and ProxyPass /olat ajp://192.168.1.5:8009/olat
had not worked.But this trick which I mentioned above did the job.Mentioning
here so that it helps some one else.
------------------------------
*From:* Igor Cicimov <ic...@gmail.com>
*To:* users@httpd.apache.org
*Sent:* Thu, 24 February, 2011 3:32:37 AM
*Subject:* Re: [users@httpd] how to set auto redirection in apache with
tomcat

Does this work?        ProxyPass / ajp://192.168.1.19:8009/olat
 ProxyPassReverse / ajp://19...

Re: [users@httpd] how to set auto redirection in apache with tomcat

Posted by James Godrej <ja...@yahoo.in>.
Hi Igor,
thanks for message I had tried.I just came across a trick which did the job.
I had 
hat I did to get it working was deleted



/var/lib/tomcat6/webapps/ROOT and renamed my application



/var/lib/tomcat6/webapps/olat to


/var/lib/tomcat6/webapps/ROOT and removed the olat.war from



/var/lib/tomcat6/webapps/ then restarted tomcat6


/etc/init.d/tomcat6 restartand I could see auto redirection happening.
Here I would like to mention I did not changed the original vhost which I posted 
in my first question and ProxyPass /olat ajp://192.168.1.5:8009/olat
had not worked.But this trick which I mentioned above did the job.Mentioning 
here so that it helps some one else.

________________________________
From: Igor Cicimov <ic...@gmail.com>
To: users@httpd.apache.org
Sent: Thu, 24 February, 2011 3:32:37 AM
Subject: Re: [users@httpd] how to set auto redirection in apache with tomcat

Does this work?

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

Also not sure if "ProxyPreserveHost On" has eny meaning in case of reverse proxy 
but not sure and don't have time now to double check :) Maybe someone else can 
confirm ...




On Thu, Feb 24, 2011 at 8:18 AM, James Godrej <ja...@yahoo.in> wrote:


>
>I have a site http://social.openitup.in
>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
>
><VirtualHost *:80 >
>
>       ServerName social.openitup.in
>       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://social.openitup.in/olat
>what I want to do is when some one opens
>http://social.openitup.in
>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 achieved?
>
>
>
>---------------------------------------------------------------------
>The official User-To-User support forum of the Apache HTTP Server Project.
>See <URL:http://httpd.apache.org/userslist.html> for more info.
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>  "   from the digest: users-digest-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>



Re: [users@httpd] how to set auto redirection in apache with tomcat

Posted by Igor Cicimov <ic...@gmail.com>.
Does this work?

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

Also not sure if "ProxyPreserveHost On" has eny meaning in case of reverse
proxy but not sure and don't have time now to double check :) Maybe someone
else can confirm ...



On Thu, Feb 24, 2011 at 8:18 AM, James Godrej <ja...@yahoo.in> wrote:

>
>
> I have a site http://social.openitup.in
> 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
>
> <VirtualHost *:80 >
>
>        ServerName social.openitup.in
>        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://social.openitup.in/olat
> what I want to do is when some one opens
> http://social.openitup.in
> 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 achieved?
>
>
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>