homepage Welcome to WebmasterWorld Guest from 54.196.225.45
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Apache Proxy
twprogrammers




msg:4585423
 5:46 pm on Jun 18, 2013 (gmt 0)

Ok, I have a website using apache2 on port 80. I have privoxy forwarding socks5 from tor. I can't seem to figure out how to use the apache proxy module to pipe traffic from my subdomain on port 80 to privoxy on port 8118. Basically when I am on the guest wifi at my doctors office it blocks all outgoing ports except 80. I was running it locally from my laptop but it was slowing everything else down (my laptop has slow and decrepit syndrome) so I decided to use my webserver as a work around. Now I am stuck trying to figure the proxy module. Everything I tried makes it direct to the /var/www folder, so going to, say, www.google.com/search says this folder does not exist but when I go to www.google.com it pops up my server's /var/www folder. This is very confusing for me. All help is appreciated.

 

phranque




msg:4587669
 3:46 am on Jun 26, 2013 (gmt 0)

what have you tried so far?

twprogrammers




msg:4588647
 11:40 pm on Jun 28, 2013 (gmt 0)

Gosh, that's a lot of stuff to list....
<Proxy *:80>...</Proxy>
<Proxy proxy.example.com:80>...</Proxy>
<Proxy *>...</Proxy>
<Proxy proxy.example.com>...</Proxy>
<VirtualHost *:80>...</VirtualHost>
<Location />...</Location>


... being almost all possible combinations of the following:

ProxyPass / http://proxy.example.com:8118
ProxyPassReverse / http://proxy.example.com:8118
ProxyRequests On
ProxyVia On
SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1
ProxyRemote * http://proxy.example.com:8118


I am probably missing a few, but I can't think of them at the moment.

[edited by: phranque at 6:01 am (utc) on Jun 29, 2013]
[edit reason] unlinked & exemplified urls [/edit]

lucy24




msg:4588655
 1:28 am on Jun 29, 2013 (gmt 0)

Everything I tried makes it direct to the /var/www folder

This is the point at which I would open the config file in a text editor and do a global search for the string "var/www".

phranque




msg:4588698
 7:45 am on Jun 29, 2013 (gmt 0)

maybe this?

http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass
If the first argument ends with a trailing /, the second argument should also end with a trailing / and vice versa. Otherwise the resulting requests to the backend may miss some needed slashes and do not deliver the expected results.

twprogrammers




msg:4588797
 7:37 pm on Jun 29, 2013 (gmt 0)

just tried:
<VirtualHost *:80>
ServerAlias "proxy.example.com"
ServerName example.com
ProxyPass / http://proxy.example.com:8118/
ProxyPassReverse / http://proxy.example.com:8118/
ProxyRequests On
</VirtualHost>


but it just made all domains point to my servers IP Address, causing all domains to show the /var/www folder.

[edited by: phranque at 12:26 am (utc) on Jun 30, 2013]
[edit reason] Please Use Example.com [webmasterworld.com] [/edit]

twprogrammers




msg:4588801
 8:50 pm on Jun 29, 2013 (gmt 0)

I found something that helps on what I need to do, but not how I am to accomplish it. What I need is a forward proxy that goes through a second forward proxy before it reaches the internet. So basically:

Me @ any port -> Apache @ server:80 -> Privoxy forwarding Tor @ server:8118 -> Internet


So how would I do that using mod_proxy and/or other Apache modules?

twprogrammers




msg:4588918
 12:18 pm on Jun 30, 2013 (gmt 0)

I'm sorry for triple posting the time for editing the two posts above expired.
@phranque I'm sorry, when I realized that posting my domain was against the rules it was too late to edit my posts. I will not, at least try my best not to, do it again.

twprogrammers




msg:4593390
 11:44 pm on Jul 15, 2013 (gmt 0)

bump

twprogrammers




msg:4596826
 6:08 pm on Jul 26, 2013 (gmt 0)

Nevermind, it was taking too much ram to host it on my server. So I no longer need this.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved