Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Need Help with reverse Proxy

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Problem changing PHP from CGI to module in Apache..  
Author Message
user2709

External


Since: Mar 10, 2004
Posts: 4



(Msg. 1) Posted: Wed Mar 10, 2004 11:29 pm
Post subject: Need Help with reverse Proxy
Archived from groups: alt>apache>configuration (more info?)

Hi,
i have same troubles with my Reverse Proxy Configuration.
I have two dns entrys (server1.mydomain.at,server2.mydomain.at) that
points to the same IP Adress in the Internet.
From this Server i want to redirect the Request to internal Web Server.

https://server1.mydomain.at --> works fine
http://server2.mydomain.at --> works fine

http://server1.mydomain.at --> Redirects to server2 on Port 80

What i want is a Name Based Redirect, so if i try to open
http://server1.mydomain.at the error Message no Page found comes up.
Because for this Host no Port 80 is open.

Can anybody say me what i did wrong?

Apache/2.0.46

<VirtualHost 0.0.0.0:443 >
Servername server1.mydomain.at
ProxyPass / http://internal1:5777/
ProxyPassReverse / http://internal1:5777/
ProxyPreserveHost On
ProxyRequests Off
.....
...
..
</VirtualHost>

<VirtualHost 0.0.0.0:80 >
Servername server2.mydomain.at
ProxyPass / http://internal2:4890/
ProxyPassReverse / http://internal2:4890/
ProxyPreserveHost On
ProxyRequests Off
.....
....
...
</VirtualHost>

regards
Peter

 >> Stay informed about: Need Help with reverse Proxy 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Thu Mar 11, 2004 9:02 am
Post subject: Re: Need Help with reverse Proxy [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Peter <nospam.luciver RemoveThis @teleweb.at> wrote:
 > From this Server i want to redirect the Request to internal Web Server.
 > <a style='text-decoration: underline;' href="http://server1.mydomain.at" target="_blank">http://server1.mydomain.at</a> --> Redirects to server2 on Port 80

Probably because you didn't defined a VHost to serve server1, so the
'default' one is used.

 > What i want is a Name Based Redirect, so if i try to open
 > <a style='text-decoration: underline;' href="http://server1.mydomain.at" target="_blank">http://server1.mydomain.at</a> the error Message no Page found comes up.

To get a 'no page found' you need to serve it. So, add a VHost to
handle server1.mydomain.at and set his default page of 'no page
found', for this you don't need proxy, just a local page.

Davide

--
| The biggest difference between time and space is that you can't reuse
| time. -- Merrick Furst
|
|<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Need Help with reverse Proxy 
Back to top
Login to vote
user2709

External


Since: Mar 10, 2004
Posts: 4



(Msg. 3) Posted: Thu Mar 11, 2004 10:02 pm
Post subject: Re: Need Help with reverse Proxy [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,
ok i have tired something like this...


NameVirtualHost server2.mydomain.at:80
NameVirtualHost server1.mydomain.at:443

<VirtualHost server1.mydomain.at:443 >
Servername server1.mydomain.at
ProxyPass / http://internal1:5777/
ProxyPassReverse / http://internal1:5777/
ProxyPreserveHost On
ProxyRequests Off
.....
...
..
</VirtualHost>

<VirtualHost server2.mydomain.at:80 >
Servername server2.mydomain.at
ProxyPass / http://internal2:4890/
ProxyPassReverse / http://internal2:4890/
ProxyPreserveHost On
ProxyRequests Off
.....
....
...
</VirtualHost>

but the Problem is still the same. If i go to http://server1.mydomain.at
i got a answer from server2 which is false because it should only answer
on https Request..


regards
Peter
 >> Stay informed about: Need Help with reverse Proxy 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 4) Posted: Thu Mar 11, 2004 10:33 pm
Post subject: Re: Need Help with reverse Proxy [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Peter <nospam.luciver.DeleteThis@teleweb.at> wrote:
 >
 > NameVirtualHost server2.mydomain.at:80
 > NameVirtualHost server1.mydomain.at:443
 >
 > but the Problem is still the same. If i go to <a style='text-decoration: underline;' href="http://server1.mydomain.at" target="_blank">http://server1.mydomain.at</a>
 > i got a answer from server2 which is false because it should only answer
 > on https Request..

Well, actually no. From what you wrote server2 is responding to http,
and you requested http, so the only VHost available on port 80 is
responding to your request. That is correct.

What I have in my configuration (one of my servers) is:

NameVirtualHost *:80
NameVirtualHost *:443

<VirtualHost *:80>
  ServerName ....
  ServerAlias ...
 
  ProxyRequest Off

  ProxyPass /application1/ http://internalip/application1/
  ProxyPassReverse /application1/ http://internalip/application1/

  ProxyPass /application2/ http://internalip2/application2/
  ProxyPassReverse /application2/ http://internalip2/application2/

  ...many more...
</VirtualHost>

<VirtualHost *:443>
  ServerName ....
  ServerAlias ...
 
  ProxyRequest Off

  ProxyPass /application4/ http://internalip/application4/
  ProxyPassReverse /application4/ http://internalip/application4/

  ...many more...
</VirtualHost>

Yes, I'm running multiple applications trought one proxy. Note that I use
* and not the ServerName, so the first VHost can respond to multiple
domain names.

Davide

--
| All true wisdom is found on T-shirts.
|
|
|<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Need Help with reverse Proxy 
Back to top
Login to vote
user2709

External


Since: Mar 10, 2004
Posts: 4



(Msg. 5) Posted: Thu Mar 11, 2004 10:47 pm
Post subject: Re: Need Help with reverse Proxy [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,
thanks for this tip. I have tried it and it works goot, but there is one
Problem. In your Configuration you make a Proxy with /app1 and so on
without to look into the Server Name. My Goal is to do the same with the
Server Root.

Like
ProxyPass /
and not
ProxyPass /application1/

I hope you know what i mean ....
Is there a Solution for this?


regards
Peter
 >> Stay informed about: Need Help with reverse Proxy 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 6) Posted: Thu Mar 11, 2004 11:27 pm
Post subject: Re: Need Help with reverse Proxy [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Peter <nospam.luciver.TakeThisOut@teleweb.at> wrote:
 > In your Configuration you make a Proxy with /app1 and so on

Yes, as I said, I'm running multiple applications, if you have
just one, you can use / and proxy that. I can't because I need
a way to distinguish the various applications, otherwise
Apache doesn't know what to send to which server...

You just need

ProxyPass / http://
ProxyPassReverse / http://

Davide

--
| "Life may have no meaning -- or even worse, it may have a meaning of
| which I disapprove."
|
|<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Need Help with reverse Proxy 
Back to top
Login to vote
user2709

External


Since: Mar 10, 2004
Posts: 4



(Msg. 7) Posted: Thu Mar 11, 2004 11:34 pm
Post subject: Re: Need Help with reverse Proxy [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,
thanks for this Input, maybe i do something wrong in my concept. I have
different DNS Entry that Point so the same IP Adress of my Server. My
Server should serve different Web Server in my LAN. So i try to use
Reverse Proxy. Is there a other way to do this?

Sample

<a style='text-decoration: underline;' href="http://server1.mydomain.at" target="_blank">http://server1.mydomain.at</a> --> LAN Server A
<a style='text-decoration: underline;' href="https://server2.mydomain.at" target="_blank">https://server2.mydomain.at</a> --> LAN Server B
<a style='text-decoration: underline;' href="http://server3.mydomain.at" target="_blank">http://server3.mydomain.at</a> --> LAN Server C

regards
Peter


Davide Bianchi wrote:

 > Peter <nospam.luciver RemoveThis @teleweb.at> wrote:
 >
  >>In your Configuration you make a Proxy with /app1 and so on
 >
 >
 > Yes, as I said, I'm running multiple applications, if you have
 > just one, you can use / and proxy that. I can't because I need
 > a way to distinguish the various applications, otherwise
 > Apache doesn't know what to send to which server...
 >
 > You just need
 >
 > ProxyPass / http://
 > ProxyPassReverse / http://
 >
 > Davide
 ><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Need Help with reverse Proxy 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Reverse proxy help - I am trying to setup a reverse proxy using apache 2048. I have 1 server inside our network named "websvr" that is only connected to our internal lan. The reverse proxy is connected to the internet with a static IP number and also the internal...

ftp proxy reverse - Hello! Some one can help me about Ftp proxy reverse on Apache 2? Thank you

Apache 2.0.48 and reverse proxy - Hi, I am not able to setup reverse proxies using the following script in Apache 2.0.48 because of directive problems. I have to set up two reverse proxies for my webserver running on two different ports. What changes do I need to make it running on..

reverse proxy + https - Can you help please? Is it possible to configure Apache to act as a reverse proxy (maybe the name is not appropriate) for https traffic? I've been able to set up Apache as reverse proxy (mod_proxy, mod_rewrite) and SSL server (with apache_ssl or mod_ssl...

reverse proxy configuration - Hello, I'm using Stronghold 4.0 (Apache 1.3.22) as a reverse ssl proxy with the following configuration: <VirtualHost _default_:443> # General setup for the virtual host #DocumentRoot "/usr/local/stronghold/www/htdocs" #ServerName ww...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]