Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

location ~* ^/get/(.*) 
{   
    proxy_pass http://ip:3128;
    proxy_set_header Host evenstatichostnamefortest.com;
    proxy_set_header  Request-URI http://evenstatichostnamefortest.com/samplefile.zip;
    proxy_redirect off;
}

output :

http://server.com/get/www.google.com

squid Error:

The following error was encountered while trying to retrieve the URL: /get/www.google.com

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 at 18:49
    
you mean http_port 3128 transparent ? squid works fine with browsers, but not with nginx –  RezaSh Jan 27 at 19:03
    
@NathanC : any suggestion ? –  RezaSh Jan 27 at 20:55

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.