You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by jitesh dundas <jb...@gmail.com> on 2013/02/15 16:43:52 UTC

[users@httpd] Apache Proxy Setup issue

Hi Everyone,

I am trying to setup the Apache HTTP Server to handle requests from my
Tomcat 7 application.
So for example any URL -> http://sonar.it.xyz.com should actually handle
requests from the application:-

 http://tomcat:81/sonar .

I used Proxypass and ReverseProxyPass for this and it seems to be handling
requests from http://sonar.it.xyz.com/sonar but not http://sonar.it.xyz.com

In short, I wanted to remove the /sonar part from the URL ..I have a
virtualhost defined to handle this.

Thanks & Regards,
Jitesh Dundas

Phone - 732-357-6292

Re: [users@httpd] Apache Proxy Setup issue

Posted by Igor Cicimov <ic...@gmail.com>.
On 19/02/2013 5:04 AM, "jitesh dundas" <jb...@gmail.com> wrote:
>
> Sorry I have corrected the server name but the issue is the same.(I am
hiding the actual names).
>
> <VirtualHost http://sonar.it.xyz.com :80>
>
This is wrong what is a url doing here??? Do you have NameVirtualHost set
at all in your config?

> ServerName mylaptop.company.com
Wrong too, this should be sonar.it.xyz.com

> RewriteEngine On
> RewriteCond %{REQUEST_METHOD} ^TRACE
>
> RewriteRule ^/sonar/* http://sonar.it.xyz.com:81/sonar/*
>
> ProxyPass / http://sonar.it.xyz.com:81/
> ProxyPassReverse / http://sonar.it.xyz.com:81/
> ProxyPass /sonar/* http://sonar.it.xyz.com:81/sonar/*
> ProxyPassReverse /sonar/* http://sonar.it.xyz.com:81/sonar/*
> ProxyPass /sonar/openid/validate/*
http://sonar.it.xyz.com:81/sonar/openid/validate/*
> ProxyPassReverse /sonar/openid/validate/*
http://sonar.it.xyz.com:81/sonar/openid/validate/*
>
> </VirtualHost>
> Hope this helps. Will wait for your replies.
>
Please read the documentation about virtual hosting on apache web site,
obviously you lack basic understanding of it.

>
> Thanks & Regards,
> Jitesh Dundas
>
> Phone - 732-357-6292
>
>
>
>
>
> On Mon, Feb 18, 2013 at 1:00 PM, jitesh dundas <jb...@gmail.com> wrote:
>>
>> Hi,
>>
>> Thank you for your reply. Here is the virtualhost entry:-
>>
>> <VirtualHost mylaptop.company.com:80>
>> ServerName mylaptop.company.com
>> RewriteEngine On
>> RewriteCond %{REQUEST_METHOD} ^TRACE
>>
>> RewriteRule ^/sonar/* http://mylaptop.company.com:81/sonar/*
>>
>> ProxyPass / http://mylaptop.company.com:81/
>> ProxyPassReverse / http://mylaptop.company.com:81/
>> ProxyPass /sonar/* http://mylaptop.company.com:81/sonar/*
>> ProxyPassReverse /sonar/* http://mylaptop.company.com:81/sonar/*
>> ProxyPass /sonar/openid/validate/*
http://mylaptop.company.com:81/sonar/openid/validate/*
>> ProxyPassReverse /sonar/openid/validate/*
http://mylaptop.company.com:81/sonar/openid/validate/*
>>
>> </VirtualHost>
>>
>>
>>
>> Thanks & Regards,
>> Jitesh Dundas
>>
>> Phone - 732-357-6292
>>
>>
>>
>>
>>
>> On Fri, Feb 15, 2013 at 8:30 PM, Igor Cicimov <ic...@gmail.com> wrote:
>>>
>>>
>>> On 16/02/2013 2:44 AM, "jitesh dundas" <jb...@gmail.com> wrote:
>>> >
>>> > Hi Everyone,
>>> >
>>> > I am trying to setup the Apache HTTP Server to handle requests from
my Tomcat 7 application.
>>> > So for example any URL -> http://sonar.it.xyz.com should actually
handle requests from the application:-
>>> >
>>> >  http://tomcat:81/sonar .
>>> >
>>> > I used Proxypass and ReverseProxyPass for this and it seems to be
handling requests from http://sonar.it.xyz.com/sonar but not
http://sonar.it.xyz.com
>>> >
>>> > In short, I wanted to remove the /sonar part from the URL ..I have a
virtualhost defined to handle this.
>>> >
>>> > Thanks & Regards,
>>> > Jitesh Dundas
>>> >
>>> > Phone - 732-357-6292
>>> >
>>> Show us the statements you used
>>
>>
>

Re: [users@httpd] Apache Proxy Setup issue

Posted by jitesh dundas <jb...@gmail.com>.
Sorry I have corrected the server name but the issue is the same.(I am
hiding the actual names).

<VirtualHost http://sonar.it.xyz.com :80 <http://mylaptop.company.com/>>
ServerName mylaptop.company.com
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE

RewriteRule ^/sonar/* http:// <http://mylaptop.company.com:81/sonar/*>
sonar.it.xyz.com:81/sonar/* <http://mylaptop.company.com:81/sonar/*>

ProxyPass / http://
<http://mylaptop.company.com:81/>sonar.it.xyz.com:81/<http://mylaptop.company.com:81/>
ProxyPassReverse / http:// <http://mylaptop.company.com:81/>sonar.it.xyz.com
:81/ <http://mylaptop.company.com:81/>
ProxyPass /sonar/* http:// <http://mylaptop.company.com:81/sonar/*>
sonar.it.xyz.com:81/sonar/* <http://mylaptop.company.com:81/sonar/*>
ProxyPassReverse /sonar/* http:// <http://mylaptop.company.com:81/sonar/*>
sonar.it.xyz.com:81/sonar/* <http://mylaptop.company.com:81/sonar/*>
ProxyPass /sonar/openid/validate/*
http://<http://mylaptop.company.com:81/sonar/openid/validate/*>
sonar.it.xyz.com:81/sonar/openid/validate/*<http://mylaptop.company.com:81/sonar/openid/validate/*>
ProxyPassReverse /sonar/openid/validate/*
http://<http://mylaptop.company.com:81/sonar/openid/validate/*>
sonar.it.xyz.com:81/sonar/openid/validate/*<http://mylaptop.company.com:81/sonar/openid/validate/*>

</VirtualHost>

Hope this helps. Will wait for your replies.

Thanks & Regards,
Jitesh Dundas

Phone - 732-357-6292





On Mon, Feb 18, 2013 at 1:00 PM, jitesh dundas <jb...@gmail.com> wrote:

> Hi,
>
> Thank you for your reply. Here is the virtualhost entry:-
>
> <VirtualHost mylaptop.company.com:80>
> ServerName mylaptop.company.com
> RewriteEngine On
> RewriteCond %{REQUEST_METHOD} ^TRACE
>
> RewriteRule ^/sonar/* http://mylaptop.company.com:81/sonar/*
>
> ProxyPass / http://mylaptop.company.com:81/
> ProxyPassReverse / http://mylaptop.company.com:81/
> ProxyPass /sonar/* http://mylaptop.company.com:81/sonar/*
> ProxyPassReverse /sonar/* http://mylaptop.company.com:81/sonar/*
> ProxyPass /sonar/openid/validate/*
> http://mylaptop.company.com:81/sonar/openid/validate/*
> ProxyPassReverse /sonar/openid/validate/*
> http://mylaptop.company.com:81/sonar/openid/validate/*
>
> </VirtualHost>
>
>
>
> Thanks & Regards,
> Jitesh Dundas
>
> Phone - 732-357-6292
>
>
>
>
>
> On Fri, Feb 15, 2013 at 8:30 PM, Igor Cicimov <ic...@gmail.com> wrote:
>
>>
>> On 16/02/2013 2:44 AM, "jitesh dundas" <jb...@gmail.com> wrote:
>> >
>> > Hi Everyone,
>> >
>> > I am trying to setup the Apache HTTP Server to handle requests from my
>> Tomcat 7 application.
>> > So for example any URL -> http://sonar.it.xyz.com should actually
>> handle requests from the application:-
>> >
>> >  http://tomcat:81/sonar .
>> >
>> > I used Proxypass and ReverseProxyPass for this and it seems to be
>> handling requests from http://sonar.it.xyz.com/sonar but not
>> http://sonar.it.xyz.com
>> >
>> > In short, I wanted to remove the /sonar part from the URL ..I have a
>> virtualhost defined to handle this.
>> >
>> > Thanks & Regards,
>> > Jitesh Dundas
>> >
>> > Phone - 732-357-6292
>> >
>> Show us the statements you used
>>
>>
>

Re: [users@httpd] Apache Proxy Setup issue

Posted by jitesh dundas <jb...@gmail.com>.
Hi,

Thank you for your reply. Here is the virtualhost entry:-

<VirtualHost mylaptop.company.com:80>
ServerName mylaptop.company.com
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE

RewriteRule ^/sonar/* http://mylaptop.company.com:81/sonar/*

ProxyPass / http://mylaptop.company.com:81/
ProxyPassReverse / http://mylaptop.company.com:81/
ProxyPass /sonar/* http://mylaptop.company.com:81/sonar/*
ProxyPassReverse /sonar/* http://mylaptop.company.com:81/sonar/*
ProxyPass /sonar/openid/validate/*
http://mylaptop.company.com:81/sonar/openid/validate/*
ProxyPassReverse /sonar/openid/validate/*
http://mylaptop.company.com:81/sonar/openid/validate/*

</VirtualHost>


Thanks & Regards,
Jitesh Dundas

Phone - 732-357-6292





On Fri, Feb 15, 2013 at 8:30 PM, Igor Cicimov <ic...@gmail.com> wrote:

>
> On 16/02/2013 2:44 AM, "jitesh dundas" <jb...@gmail.com> wrote:
> >
> > Hi Everyone,
> >
> > I am trying to setup the Apache HTTP Server to handle requests from my
> Tomcat 7 application.
> > So for example any URL -> http://sonar.it.xyz.com should actually
> handle requests from the application:-
> >
> >  http://tomcat:81/sonar .
> >
> > I used Proxypass and ReverseProxyPass for this and it seems to be
> handling requests from http://sonar.it.xyz.com/sonar but not
> http://sonar.it.xyz.com
> >
> > In short, I wanted to remove the /sonar part from the URL ..I have a
> virtualhost defined to handle this.
> >
> > Thanks & Regards,
> > Jitesh Dundas
> >
> > Phone - 732-357-6292
> >
> Show us the statements you used
>
>

Re: [users@httpd] Apache Proxy Setup issue

Posted by Igor Cicimov <ic...@gmail.com>.
On 16/02/2013 2:44 AM, "jitesh dundas" <jb...@gmail.com> wrote:
>
> Hi Everyone,
>
> I am trying to setup the Apache HTTP Server to handle requests from my
Tomcat 7 application.
> So for example any URL -> http://sonar.it.xyz.com should actually handle
requests from the application:-
>
>  http://tomcat:81/sonar .
>
> I used Proxypass and ReverseProxyPass for this and it seems to be
handling requests from http://sonar.it.xyz.com/sonar but not
http://sonar.it.xyz.com
>
> In short, I wanted to remove the /sonar part from the URL ..I have a
virtualhost defined to handle this.
>
> Thanks & Regards,
> Jitesh Dundas
>
> Phone - 732-357-6292
>
Show us the statements you used