Now merged in the Windows native port
(Cygwin port of Squid, plus many NT service enhancement, derived from the Harvest project)
- Run as a native Windows NT Service, multiple Squid service instances are allowed
- Full Command line support when running as a service
- Automatic Service restart after Squid failure on Windows 2000 & XP
- Internal DNS can look in registry for configured DNS
- All squid -k switches (check, debug, interrupt, kill, parse, reconfigure, rotate, shutdown) works when running as a Windows NT service
- Native WIN32 Basic and NTLM Authenticator, is possible to authenticante against a single NT Server,
a single or a trusted NT Domain.
- External ACL native WIN32 group helper
At this time Windows is a platform partially supported from Squid Community.
- Download with CVS the cygwin-svc-2_5 branch (STABLE based) or the cygwin-svc branch (DEVEL based) from devel.squid-cache.org
- "Bootstrap" Automake/Autoconf environment running ./bootstrap.sh
- Configure and make Squid with autoconf and make as usual in a Cygwin bash session
Don't forget the new --enable-win32-service configure option !!!
- Add a new Cygwin user - see the Cygwin user guide - and map it to SYSTEM, or create a new NT user, and a matching cygwin user and they
become your squid runas users.
- Read the squid FAQ on permissions if you are using CYGWIN=ntsec.
- Edit the squid.conf (use path with '/' char, NOT '\')
- If not already present, copy the system32\psapi.dll file to your %SystemRoot%\system32 (Not needed on Windows 2000/XP)
- Make sure that your cygwin\bin path is in the Windows PATH.
- squid -i [-f configfile] [-n servicename] (installs the servicename Squid service using the configfile configuration file, default configfile is "C:/squid/etc/squid.conf", default servicename is "SquidNT")
- Create the ./var/logs directory
- squid -z [-f configfile] (creates the cache directories)
- squid -O "servicecommandline" [-n servicename] (Set in Windows Registry the Squid servicename service command line)
- squid -r [-n servicename] (removes the servicename Squid service)
- Start: Control Panel/Services: choose "Start" for the "SquidNT" service.
- Stop: Control Panel/Services: choose "Stop" for the "SquidNT" service.
- squid -h Print help message.
- squid -n servicename [-f configfile] -k reconfigure | rotate | shutdown | interrupt | kill | debug | check
Send signal to running copy and exit.
- squid -O servicecommandline [-n servicename] Set Windows Service Command line options in Registry.
- squid -v Print version.
The rest of the (original) cmdline switches when running as a Service must be used with the -O switch.
Don't forget to take a look on Squid documentation on www.squid-cache.org
This Squid build can support multiple Squid service instances running from the same executable,
so the service name MUST be ALWAYS specified when using all -k, -O commands even running only one instance.
Every instance must have a different service name, use different TCP ports, use different logs and cache Directory and use a different configuration file.
So, when installing the service, if don't using the default settings (c:/squid, SquidNT Service Name), the service name and
the associated config file MUST be specified.
The same when removing or running squid -k or -O commands.
Command Line mode:
- All Squid cmdline switches are available, except the -N (no daemon mode)
Compile environment needed:
- Cygwin 1.3.12 or later
- Autoconf 2.53
- Automake 1.6
- When compiling, if you get compile errors about SC_ACTION, SERVICE_DESCRIPTION and SERVICE_FAILURE_ACTION,
you need to update w32api package to 1.3.2 or later.
- Compatibility Notes:
- Known Limitations:
- Squid features not operationals: DISKD, WCCP, Transparent Proxy.
- Some external helpers may not work.
For no Windows port specific problems try on squid-users mailing list.
No warranties of any kind. No time for support, sorry. Use at your own risk.