Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to run squid server behind nginx. my sample configuration :

location ~* ^/get/(.*) 
    proxy_pass http://ip:3128;
    proxy_set_header Host;
    proxy_set_header  Request-URI;
    proxy_redirect off;

output :

squid Error:

The following error was encountered while trying to retrieve the URL: /get/

Invalid URL

all I want is passing requests based on folders ( e.g mysite/get/videourl to youtube/videourl and mysite/dl/filename to my download service ) but I wonder why I can't even overide Request-URI and Host with statics values

any help would be appreciated

share|improve this question
How's your squid.conf look? Is it set as a transparent proxy? – Nathan C Jan 27 '14 at 18:49
you mean http_port 3128 transparent ? squid works fine with browsers, but not with nginx – RezaSh Jan 27 '14 at 19:03
@NathanC : any suggestion ? – RezaSh Jan 27 '14 at 20:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.