Apache Server configuration support - mod_proxy Konfiguration for accessing port behind firewall

This is Interesting: Free IT Magazines  
Home > Archive > Apache Server configuration support > February 2006 > mod_proxy Konfiguration for accessing port behind firewall





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author mod_proxy Konfiguration for accessing port behind firewall
Rudolf Schmidt

2006-02-14, 6:02 pm

Hi,

I have an Apache with several virtual hosts running on port 80, which
is the only port open in the firewall.

I have another Apache with a monitoring software on port 9595 which I
want to Access using the Apache running on Port 80.

For example www.mydomain.com should be answered by
www.mydomain.com:9595 This way the client has to use port 80 only.

How can I make this work, what do I have to configure in the Port 80
Apache?

Thanks,
Rudolf

Davide Bianchi

2006-02-14, 6:02 pm

On 2006-02-14, Rudolf Schmidt <webapp@gmx.de> wrote:
> For example www.mydomain.com should be answered by
> www.mydomain.com:9595 This way the client has to use port 80 only.
>
> How can I make this work, what do I have to configure in the Port 80
> Apache?


Use the mod_vhost with mod_proxy. In a pinch:

NameVirtualHost *:80

<VirtualHost *:80>
ServerName www.mydomain.com
ProxyVia Off
ProxyPass / http://the.other.apache.server:9595/
ProxyPassReverse / http://the.other.apache.server:9595/
</VirtualHost>

Davide

--
If you don't pay for criminally bad software through the nose, you will
never realize how much you are being ripped off!
-- Pim van Riezen
Rudolf Schmidt

2006-02-14, 6:02 pm

Thanks for reply, but it doesn't work. I get a "Forbidden -You don't
have permission to access / on this server." Any suggestions?

Thanks, Rudolf

Robert Ionescu

2006-02-14, 6:02 pm

Rudolf Schmidt wrote:
> Thanks for reply, but it doesn't work. I get a "Forbidden -You don't
> have permission to access / on this server." Any suggestions?


But you did load the module mod_proxy and for apache 2.x also the modul
mod_proxy_http?
If yes, can you find anything in your error.log?

--
Robert
Rudolf Schmidt

2006-02-14, 6:02 pm

Ok, this fixed the first problem. I know see the login screen from the
http service running at 9595. Unfortunatly, if I try to login, I get an
Error HTTP 400 - Bad request.

Robert Ionescu

2006-02-14, 6:02 pm

Rudolf Schmidt wrote:
> Ok, this fixed the first problem. I know see the login screen from the
> http service running at 9595. Unfortunatly, if I try to login, I get an
> Error HTTP 400 - Bad request.


So this error comes from your backend-server? If you call httpd:9595
directly, everything works fine without the 400 error? Anything logged
in your errorlogs?

--
Robert
Rudolf Schmidt

2006-02-14, 6:02 pm

Yes, if I call the domain directly with port 9595 everything works fine.

Robert Ionescu

2006-02-14, 6:02 pm

Rudolf Schmidt wrote:
> Yes, if I call the domain directly with port 9595 everything works fine.


Your error.log both of :80 and :9595 is empty? Which string is logged in
the access.log of :9595?

There are some escaping bugs if you'd use mod_rewrite and the P-flag for
Proxypass, but this is not the case here...

--
Robert
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com