You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Patrick Coleman <pa...@bluedog.net> on 2007/10/18 00:29:08 UTC
[users@httpd] rewrite or proxypass?
Hi,
I don't exactly know if this is a rewrite or proxypass or something
else type of thing so
I was hoping someone could help.
I have a Tomcat app running on port 8080
I can get to it through
http://www.ourcompany.com:8080
it goes to a login page and the URL displays
http://www.ourcompany.com:8080/login
I would like to be able to just put in
http://www.ourcompany.com
and get
http://www.ourcompany.com/login
Could anyone help me with this?
Thanks.
Pat.
---------------------------------------------------------------------
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] rewrite or proxypass?
Posted by Patrick Coleman <pa...@bluedog.net>.
Thanks to
Axel-Stephane
Robert Jaeschke
and
solprovider
for helping with this.
Solprovider suggested running Tomcat on port 80 because nothing is
running there
and that would be the easiest solution. I didn't want to do that
because that might change.
The solution Robert suggested worked. I could have sworn I tried this
but must have had something
different.
ProxyPass / http://www.ourcompany.com:8080/
ProxyPassReverse / http://www.ourcompany.com:8080/
Axel's suggestion is very similar but I got an error
Forbidden
You don't have permission to access / on this server
This is his
ProxyPass http://www.ourcompany.com/ http://www.ourcompany.com:8080/
ProxyPassReverse http://www.ourcompany.com/ http://www.ourcompany.com:
8080/
Can you tell me the difference and why his didn't work?
Thanks for your help.
Pat.
RE: [users@httpd] rewrite or proxypass?
Posted by Axel-Stephane SMORGRAV <Ax...@europe.adp.com>.
Could it possibly be this simple?? You probably want to have two virtual hosts, one for port 80 and one for port 8080. In the former, add the following lines:
ProxyRequests Off
ProxyPass http://www.ourcompany.com/ http://www.ourcompany.com:8080/
ProxyPassReverse http://www.ourcompany.com/ http://www.ourcompany.com:8080/
Refer to the mod_proxy documentation for more details.
-ascs
-----Message d'origine-----
De : Patrick Coleman [mailto:pat@bluedog.net]
Envoyé : jeudi 18 octobre 2007 00:29
À : users@httpd.apache.org
Objet : [users@httpd] rewrite or proxypass?
Hi,
I don't exactly know if this is a rewrite or proxypass or something else type of thing so I was hoping someone could help.
I have a Tomcat app running on port 8080
I can get to it through
http://www.ourcompany.com:8080
it goes to a login page and the URL displays
http://www.ourcompany.com:8080/login
I would like to be able to just put in
http://www.ourcompany.com
and get
http://www.ourcompany.com/login
Could anyone help me with this?
Thanks.
Pat.
---------------------------------------------------------------------
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
---------------------------------------------------------------------
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] rewrite or proxypass?
Posted by Patrick Coleman <pa...@bluedog.net>.
Thanks Nick that might be it. Will let you know.
On Oct 18, 2007, at 9:07 AM, Nick Kew wrote:
> On Thu, 18 Oct 2007 07:32:59 -0400
> Patrick Coleman <pa...@bluedog.net> wrote:
>
>> ..work on the initial screen and the first screen after logging in
>> if I click on any that the 8080 shows up again in the URL?
>>
>> Is there something else that needs to be added to pick that up each
>> time?
>
> You may need to rewrite links.
> See http://www.apachetutor.org/admin/reverseproxies
>
> --
> Nick Kew
>
> Application Development with Apache - the Apache Modules Book
> http://www.apachetutor.org/
>
> ---------------------------------------------------------------------
> 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
>
>
---------------------------------------------------------------------
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] rewrite or proxypass?
Posted by Nick Kew <ni...@webthing.com>.
On Thu, 18 Oct 2007 07:32:59 -0400
Patrick Coleman <pa...@bluedog.net> wrote:
> ..work on the initial screen and the first screen after logging in
> if I click on any that the 8080 shows up again in the URL?
>
> Is there something else that needs to be added to pick that up each
> time?
You may need to rewrite links.
See http://www.apachetutor.org/admin/reverseproxies
--
Nick Kew
Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/
---------------------------------------------------------------------
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] rewrite or proxypass?
Posted by so...@apache.org.
Where is the login homepage? Where does it POST?
Where is the application?
What URLs do clients see?
How do those URLs reach the correct server/port?
How does the application send URLs usable by the client?
>From my understanding of your needs, only example.com:80 should be
accessible to clients. You want to firewall port 8080 from clients.
Apache httpd on port 80 will proxy to port 8080. Questions:
1. Are all requests using the proxy? Why bother using a proxy? (That
was my previous question.)
2. Does a virtual server name indicate using the proxy? (app.example.com)
3. Do certain paths indicate using the proxy? (example.com/app/...)
Your current issue is the application is not aware of the proxy.
mod_proxy only rewrites request URLs. You need to use one of the
following options:
1. Configure the application for use behind the proxy. Something like:
ROOT_PREFIX = "http://www.example.com/app/"
The syntax will depend on the application and the abilities of the developers.
2. Use mod_proxy_html to rewrite the HTML sent by the application to
change every "http://www.example.com:8080/" to
"http"//www.example.com/app/".
solprovider
On 10/18/07, Patrick Coleman <pa...@bluedog.net> wrote:
> I may have spoken a little too soon.
>
> While the entries I used ..
>
> ProxyPass / http://www.ourcompany.com:8080/
> ProxyPassReverse / http://www.ourcompany.com:8080/
>
> ..work on the initial screen and the first screen after logging in
> if I click on any that the 8080 shows up again in the URL?
>
> Is there something else that needs to be added to pick that up each
> time?
>
> On Oct 18, 2007, at 2:31 AM, solprovider@apache.org wrote:
> > Why not put the homepage/login page on port 80 and proxy the POST to
> > Tomcat? Or are dynamic elements on the login page?
> >
> > If everything will be served by Tomcat, why not run tomcat on port 80?
> >
> > If you are using virtual servers, you should already have
> > configured the proxy.
> >
> > solprovider
> >
> > On 10/17/07, Patrick Coleman <pa...@bluedog.net> wrote:
> >> I don't exactly know if this is a rewrite or proxypass or something
> >> else type of thing so
> >> I was hoping someone could help.
> >> I have a Tomcat app running on port 8080
> >> I can get to it through
> >> http://www.example.com:8080
> >>
> >> it goes to a login page and the URL displays
> >> http://www.example.com:8080/login
> >>
> >> I would like to be able to just put in
> >> http://www.example.com
> >> and get
> >> http://www.example.com/login
> >>
> >> Thanks.
> >> Pat
---------------------------------------------------------------------
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] rewrite or proxypass?
Posted by Patrick Coleman <pa...@bluedog.net>.
I may have spoken a little too soon.
While the entries I used ..
ProxyPass / http://www.ourcompany.com:8080/
ProxyPassReverse / http://www.ourcompany.com:8080/
..work on the initial screen and the first screen after logging in
if I click on any that the 8080 shows up again in the URL?
Is there something else that needs to be added to pick that up each
time?
thanks
On Oct 18, 2007, at 2:31 AM, solprovider@apache.org wrote:
> Why not put the homepage/login page on port 80 and proxy the POST to
> Tomcat? Or are dynamic elements on the login page?
>
> If everything will be served by Tomcat, why not run tomcat on port 80?
>
> If you are using virtual servers, you should already have
> configured the proxy.
>
> solprovider
>
>
> On 10/17/07, Patrick Coleman <pa...@bluedog.net> wrote:
>> I don't exactly know if this is a rewrite or proxypass or something
>> else type of thing so
>> I was hoping someone could help.
>> I have a Tomcat app running on port 8080
>> I can get to it through
>> http://www.example.com:8080
>>
>> it goes to a login page and the URL displays
>> http://www.example.com:8080/login
>>
>> I would like to be able to just put in
>> http://www.example.com
>> and get
>> http://www.example.com/login
>>
>> Thanks.
>> Pat
>
> ---------------------------------------------------------------------
> 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
>
>
---------------------------------------------------------------------
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] rewrite or proxypass?
Posted by so...@apache.org.
Why not put the homepage/login page on port 80 and proxy the POST to
Tomcat? Or are dynamic elements on the login page?
If everything will be served by Tomcat, why not run tomcat on port 80?
If you are using virtual servers, you should already have configured the proxy.
solprovider
On 10/17/07, Patrick Coleman <pa...@bluedog.net> wrote:
> I don't exactly know if this is a rewrite or proxypass or something
> else type of thing so
> I was hoping someone could help.
> I have a Tomcat app running on port 8080
> I can get to it through
> http://www.example.com:8080
>
> it goes to a login page and the URL displays
> http://www.example.com:8080/login
>
> I would like to be able to just put in
> http://www.example.com
> and get
> http://www.example.com/login
>
> Thanks.
> Pat
---------------------------------------------------------------------
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] rewrite or proxypass?
Posted by Robert Jaeschke <ja...@cs.uni-kassel.de>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello Patrick,
Patrick Coleman schrieb:
> I have a Tomcat app running on port 8080
>
> I can get to it through
>
> http://www.ourcompany.com:8080
>
> it goes to a login page and the URL displays
>
> http://www.ourcompany.com:8080/login
>
> I would like to be able to just put in
>
> http://www.ourcompany.com
>
> and get
>
> http://www.ourcompany.com/login
>
> Could anyone help me with this?
You have to use mod_proxy and those two lines to your conf:
ProxyPass / http://www.ourcompany.com:8080/
ProxyPassReverse / http://www.ourcompany.com:8080/
Best regards, Robert
- --
Robert Jäschke Tel: +49-(0)561-804-6253
Universität Kassel E-Mail: jaeschke@cs.uni-kassel.de
Wilhelmshöher Allee 73 WWW: http://www.kde.cs.uni-kassel.de
34121 Kassel >>>>>>>>>>>>>> http://www.bibsonomy.org <<<<<<<<<<<<<<<
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHFvo7KNvjYNceXPwRAo/KAJ4pLwHL+mm433wYMJs1xI4ycuc+SQCgpziv
F0DC5aeMQC9liPUZNam+Lvs=
=hv1A
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
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