I have squid running on one server( with sslbump enabled.

I configured nginx( in the other server and i want it to work in front of squid.

However, only the querystring is passed to squid. so for http://www.example.co/xxx.html, only xxx.html is passed to squid.

How to fix this.

Error Message

The following error was encountered while trying to retrieve the URL: /xxx.html


upstream squid {


server {
    listen 8338;
    server_name localhost;
    location / {
       proxy_pass http://squid;
       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header X-Forwarded-For $remote_addr;
       proxy_set_header Host $host;
  • As this is how it is supposed to be done, I would suggest you take a look at the documentation as well as your nginx configuration.
    – user237634
    Jun 9, 2015 at 6:12
  • Also nginx is a caching proxy and squid is a caching proxy, you might want to pick just one.
    – user237634
    Jun 9, 2015 at 6:15
  • This question seemed to solved now under this tread: - stackoverflow.com/questions/28331813/…
    – user266367
    Apr 16, 2017 at 10:48


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.