Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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've setup Squid on windows (Win7) and it works fine, but I want to be able to have the conf files portable. Is it possible for the paths in squid.conf to be relative to the squid working directory rather than absolute?

share|improve this question

Yes, you can use relative paths in the squid.conf. At least it works for me in Windows XP and Squid 3.0.STABLE26 if run Squid as a service. Paths should be relative to squid.exe location.

share|improve this answer

I'm not sure - but one thing you could consider doing is using an environment variable. Create a %SquidHome% or similar variable and use those in your .conf file. Then if you move it to a new machine you just set the same environment variable to the new install directory.

share|improve this answer
Unfortunately it doesn't seem to interpret the environment var, just treats it as a string literal :( – Glenn Slaven Sep 13 '10 at 2:50
Ah bummer... Maybe instead you should consider always installing it to the same location? C:\Squid or something like that... so you don't have to fight with it. I doubt it will understand relative paths is why I say this, although you could always try. – Dave Holland Sep 13 '10 at 3:26

You may use -f options to set config-file. If you setup windows service:

squid.exe -i -f PATH

if you run squid daemon:

squid.exe -f PATH
share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.