logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: proxypass
Author
jmblock2



Joined: 30 May 2009
Posts: 1

PostPosted: Sat 30 May '09 6:06    Post subject: proxypass Reply with quote

Hi everyone,

I just set up Apache 2.2 on windows 7 RC1. I am trying to do some proxy passthroughs. I have sabnzbd and utorrent running on ports 8080 and 8081 respectively. I add this to the httpd.conf:

ProxyPass /sabnzbd http://127.0.0.1:8080/sabnzbd
ProxyPassReverse /sabnzbd http://127.0.0.1:8080/sabnzbd
ProxyPass /gui http://127.0.0.1:8081/gui
ProxyPassReverse /gui http://127.0.0.1:8081/gui

and I changed enabled these modules:
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule rewrite_module modules/mod_rewrite.so

That is probably a bit of an overkill, so if it stands out which ones aren't needed (I haven't read what connect does and I don't think sab or gui uses ftp protocol, but maybe) please mention that.

The gui one works as long as I keep the first argument '/gui'. I have looked at the definition of the directives and that doesn't make any sense to me. Why can't I have 'ProxyPass /uTorrent http://127.0.0.1:8081/gui'? The sabnzbd one doesn't work at all, it just returns 503 Service Temporarily Unavailable.

I am accessing the pages using 127.0.0.1/gui and /sabnzbd.

Ive tried http://sabnzbd.wikidot.com/howto-apache

<Location /gui>
order deny,allow
deny from all
allow from all
ProxyPass http://localhost:8081/gui
ProxyPassReverse http://localhost:8081/gui
</Location>

That works, but the equivalent sabnzbd doesn't.

The whole ordeal seems so simple, yet I can't get it working the way I want! Thanks for any help/advice/anything!

Jacob
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7355
Location: Germany, Next to Hamburg

PostPosted: Tue 16 Jun '09 20:45    Post subject: Reply with quote

I tried uTorrent. This worked for me

Code:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so

ProxyPass /gui/ http://localhost:8081/gui/
ProxyPassReverse /gui/ http://localhost:8081/gui/


Well you can't have the ProxyPass /uTorrent because of the html inside. Else you have to rewrite the pathes in the html and inside the javascript files. Well there is mod_proxy_html, but I'm not sure if it can change the pathes inside the javascript files. I didn't get a working version.


You don't need mod_proxy_connect. Only if you connect to a SSL host. And the mod_proxy_ftp is also not needed.
Back to top


Reply to topic   Topic: proxypass View previous topic :: View next topic
Post new topic   Forum Index -> Apache