LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to run multiple squid instances (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-run-multiple-squid-instances-833322/)

wmasry 09-20-2010 07:24 AM

How to run multiple squid instances
 
Dears,

I need to run multiple squid instances on my server , I am running squid version squid-2.7.STABLE5-1.el4 on RHEL 4.7 , kindly tell me how to do so.

by the way , I need to run two instance because i need to configure my proxy to act as a reverse proxy and a forward proxy, and people told me that you cannot run a forward and reverse proxy on the same instance.

regards,

bathory 09-20-2010 07:52 AM

Hi,

You can start a second squid instance using the -f option to define a different squid.conf file.
Code:

/usr/sbin/squid -f /path/to/2nd-squid.conf
Keep in mind though, that the 2 instances must also listen on different ports.

Why don't you use some other server (like apache, or nginx) for reverse proxy?

wmasry 09-21-2010 02:24 AM

Quote:

Originally Posted by bathory (Post 4103271)
Hi,

You can start a second squid instance using the -f option to define a different squid.conf file.
Code:

/usr/sbin/squid -f /path/to/2nd-squid.conf
Keep in mind though, that the 2 instances must also listen on different ports.

Why don't you use some other server (like apache, or nginx) for reverse proxy?

Thanks for your reply , I still have two other questions if you can help me with them.

1 - Can I make the two instances listen on the same ports but for different IPs?
2 - Can i include the configuration for the reverse proxy in the same configuration file for the forward proxy?

regards.

bathory 09-21-2010 03:00 AM

1. Sure you can
2. I'm afraid you cannot mix options for a web cache proxy and a reverse proxy.
For example httpd_accel_port has a different meaning when squid is used as a cache proxy (it's the port used by clients), and when it's used as a reverse proxy (it's the backend server port).

wmasry 09-22-2010 12:10 AM

Quote:

Originally Posted by bathory (Post 4104209)
1. Sure you can
2. I'm afraid you cannot mix options for a web cache proxy and a reverse proxy.
For example httpd_accel_port has a different meaning when squid is used as a cache proxy (it's the port used by clients), and when it's used as a reverse proxy (it's the backend server port).

You helped too much , big thank you


All times are GMT -5. The time now is 09:17 PM.