LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-07-2011, 09:53 AM   #1
iuselinux
LQ Newbie
 
Registered: Sep 2010
Posts: 23

Rep: Reputation: 4
Squid reverse proxy?


So im trying to configure a reverse proxy on one of my VPS servers, and im using squid3, so this tutorial doesnt work > http://www.visolve.com/squid/whitepa...verseproxy.php

I have been looking at this one though > http://www.lesismore.co.za/squid3.html

Which seems to get me a lot closer.

My goal, is to get one domain to basically proxy to another, for example.. I want www.mydomain.com, to resolve to www.google.com. Much like a shell tunnel on port 80 would, only id rather use squid.

Here is my current configuration..
Quote:
root@me [/etc/squid]# egrep -v "^#" squid.conf | sed -e '/^$/d'
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow all
icp_access allow all
http_port 80 accel defaultsite=google.com
hierarchy_stoplist cgi-bin ?
cache_dir ufs /var/spool/squid 1000 16 256
access_log /var/log/squid/access.log squid
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
always_direct allow all
coredump_dir /var/spool/squid
This works ok, except it doesnt mask it, it simply redirects.. anyone have any tips?
 
Old 02-07-2011, 10:16 AM   #2
iuselinux
LQ Newbie
 
Registered: Sep 2010
Posts: 23

Original Poster
Rep: Reputation: 4
Lmfao...

.. so I was testing with google, just like in above, and it was actually googles rewrite that was redirecting it to google... damnit
 
Old 02-08-2011, 10:01 AM   #3
iuselinux
LQ Newbie
 
Registered: Sep 2010
Posts: 23

Original Poster
Rep: Reputation: 4
Im still having a bit of an issue. Im using the same config as whats above, only defaultsite=IP_OF_MAIN_SERVER.

Now when I pass the variable $_SERVER['HTTP_HOST'];, it shows the variable of the IP thats the default site, any way to make it show whats in the URL request?... Is this a squid configuration?
 
Old 02-09-2011, 09:31 AM   #4
iuselinux
LQ Newbie
 
Registered: Sep 2010
Posts: 23

Original Poster
Rep: Reputation: 4
Any ideas?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
squid reverse proxy fernfrancis Linux - Server 1 03-29-2010 02:58 AM
Squid reverse proxy triptec Linux - Server 5 12-12-2009 08:44 AM
Squid 2.6 Reverse Proxy from Squid(3128) to OrginServer(80) Not working rraj Linux - Server 0 06-06-2008 02:29 PM
Squid as Reverse Proxy and LAN proxy? zivota Linux - Security 2 02-26-2007 05:00 PM
Reverse Proxy in squid winxandlinx Linux - Networking 3 12-04-2006 05:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration