PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > alt.apache.configuration > Apache and mod_proxy
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
alt.apache.configuration Apache web server configuration issues.

Apache and mod_proxy

Réponse
 
LinkBack Outils de la discussion
Vieux 03/10/2006, 15h48   #1
Zork
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Apache and mod_proxy

Hi all, sorry to bother on this but my google searches haven't been
useful (probably because I'm not an expert on this).

I wonder whether I Apache + mod_proxy would be ok to handle this
situations:

- some of my users have a legacy application we cannot change that used
to connect to xyz.olddomain.com to download some data.

- xyz.olddomain.com doesn't exists anymore but we know the protocal
used to exchange data

I would like my user to set zork.mydomain.com as a http proxy in their
legacy application and have my proxy redirect all the requests done by
the legacy app towards xyz.olddomain.com to that same mydomain.com
server

My understanding is that I need to use the reverse proxy functionality
but I also need the forward one to let the user set my proxy in their
application.

If the explanation is too long and you have links that can I would
be already happy with them!

Thanks a lot in advance
Zork

  Réponse avec citation
Vieux 03/10/2006, 16h05   #2
Davide Bianchi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache and mod_proxy

On 2006-10-03, Zork <skills102@googlemail.com> wrote:
> - some of my users have a legacy application we cannot change that used
> to connect to xyz.olddomain.com to download some data.


Connect using the domain name or directly with the IP?

Anyway, I'd use an IP DNAT to fool the application and have all the
request to 'xyz.olddomain.com' redirected to a different IP. This is
completely invisible to the application and works regardless of the
protocol used.

Davide

--
Caller: I just installed Windows 95 on my computer.
Tech Support: And...?
Caller: It's not working.
Tech Support: You already said that.
  Réponse avec citation
Vieux 03/10/2006, 16h15   #3
Zork
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache and mod_proxy

Thanks Davide,

> Connect using the domain name or directly with the IP?


domain name

Anyway the users are spread around and not on the same intranet (they
travel and use their laptop + an internet connection from hotels and so
forth).

That's why I was thinking about a proxy server (which is the only thing
which is configurable in that crappy legacy app).

Knowing this would apache + mod_proxy be enough? I really need a simple
solution, nothing complicated

Zork

  Réponse avec citation
Vieux 03/10/2006, 16h23   #4
Davide Bianchi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache and mod_proxy

On 2006-10-03, Zork <skills102@googlemail.com> wrote:
>> Connect using the domain name or directly with the IP?

> domain name


Then you could just fool the apps by having 'xyz.domain.com' in the
/etc/hosts file (pointing it to wathever you want).

> That's why I was thinking about a proxy server (which is the only thing
> which is configurable in that crappy legacy app).


Yes, if you use DNAT it doesn't matter what kind of apps it is, the
redirection is done at IP level.

> Knowing this would apache + mod_proxy be enough? I really need a simple
> solution, nothing complicated


Well, I tend to think that using a proxy just to do an ip redirection is
the complicated solution. I mean, a simple

iptables -t nat -A PREROUTING -d ip.of.the.server -j DNAT \
--to ip.of.the.newserver

should do it, but if you want to go for the full proxy, go ahead.

Davide


--
!07/11 PDP a ni deppart m'I !pleH
  Réponse avec citation
Vieux 03/10/2006, 16h48   #5
Zork
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache and mod_proxy

Thanks again

> Then you could just fool the apps by having 'xyz.domain.com' in the
> /etc/hosts file (pointing it to wathever you want).


they cannot change that file (they basically cannot do anything on
those laptop other than running the legacy app, check email a browse
the web). Ah, these are Windows XP machines

> Yes, if you use DNAT it doesn't matter what kind of apps it is, the
> redirection is done at IP level.


I'm not quite sure how this would work. Example:

- they connect to the internet using the wifi of an hotel
- start the legacy app and the app tries to connect to
xyz.olddomain.com which doesn't exist anymore.

How can a DNAT on my server ?

> > Knowing this would apache + mod_proxy be enough? I really need a simple
> > solution, nothing complicated

>
> Well, I tend to think that using a proxy just to do an ip redirection is


it's not an IP redirection: the legacy app need to think it is
communicating with the non existent server xyz.olddomain.com and the
only way, seems to me, it to have it connect thgrough a proxy which
will do the trick and serve the content they need from the very same
server. :-)

Zork

  Réponse avec citation
Vieux 03/10/2006, 16h58   #6
Davide Bianchi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache and mod_proxy

On 2006-10-03, Zork <skills102@googlemail.com> wrote:
> they cannot change that file (they basically cannot do anything on
> those laptop other than running the legacy app


ah, ok, then the problem is that the application is a *client* (and it
doesn't reside in the server like I understood). then the problem is:
will the application follow the rule you set for the proxy or will he
still connect to his own server (if is hardwired, is hardwired)?

If he follow the rule of the proxy then you could fool it by using the
proxy solution, otherwise I don't see a big chance of doing it.

But you'll know only after you test it.

Davide

--
!07/11 PDP a ni deppart m'I !pleH
  Réponse avec citation
Vieux 03/10/2006, 17h12   #7
Zork
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache and mod_proxy

> ah, ok, then the problem is that the application is a *client* (and it
> doesn't reside in the server like I understood).


yes, sorry it wasn't clear in my first post

> then the problem is will the application follow the rule you set for the proxy or will he
> still connect to his own server (if is hardwired, is hardwired)?


they can set a proxy server in the app configuration, I tried with a
simple debug proxy and I correctly see their connections.

> If he follow the rule of the proxy then you could fool it by using the
> proxy solution, otherwise I don't see a big chance of doing it.


yep and this is what I don't know how to do. I'm trying to set up a
proof of concept to show them we have a temporary solution until we
rewrite the whole application :-)

Looking at the (poor) docs I found online I need to use the forwarding
mod_proxy feature to let the user set proxy.mydomain.com in their
application but then need something like the reverse mod_proxy feature
to transalte transparently the legacy app request to xyz.olddomain.com
to fake.mydomiain.com.

Any hints? Thanks a lot!

  Réponse avec citation
Vieux 03/10/2006, 17h20   #8
Davide Bianchi
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Apache and mod_proxy

On 2006-10-03, Zork <skills102@googlemail.com> wrote:
> yep and this is what I don't know how to do.


Since the apps will use the server as a proxy, I suspect that you'll
still receive the request pointing to the destination server, then
you should be able to do something like

NameVirtualHost *

<VirtualHost *>
Servername xyz.domain.com
ProxyPass / http://whereveryouwant/
ProxyPassReverse / http://whereveryouwant/
</VirtualHost>

But without being able to see the application first-hand, is difficult
to say. You could also try with a real proxy server (Squid).

Davide

--
!07/11 PDP a ni deppart m'I !pleH
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 19h14.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,12468 seconds with 16 queries