I am trying to start a squid server for nginx. I configured nginx as follows:
server {
listen 8080;
location / {
proxy_pass http://localhost:3128;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
Then I installed my http network proxy:
my-nginx-server-address:8080
Therefore, when I try to view the Google homepage, nginx will receive a request:
Get http://www.google.com/ HTTP/1.1
However, when nginx passes the request to squid, it will change request_uri to
/
So the squid will not work. Is there a way to return request_uri to http://www.google.com and then pass it to the squid? Or in any other way I can run squid for nginx?
source
share