Home >Backend Development >PHP Tutorial >Using squid to build a proxy server on windows_PHP tutorial
Download SQUID FOR WINDOWS (the version I am using is Squid 2.7.STABLE6, the configuration of each version may be slightly different, please pay attention)
If there is an error message, please check the permissions of your cache directory.
2. Troubleshoot your squid.conf, that is, verify the syntax and configuration of squid.conf.
#squid/sbin/squid -k parseIf there is a syntax or configuration error in squid.conf, you will be prompted here. If not, congratulations, you can try to start Squid.
3. Start Squid in the foreground and output the startup process.
#squid/sbin/squid -N -d1Then ctrl c to stop Squid and start it running in the background.
4. Start Squid to run in the background.
#squid/sbin/squid -sAt this time, you can use ps -A to view the system processes, and you can see two squid processes.
5. Stop squid
#squid/sbin/squid -k shutdown6. Reboot the modified squid.conf
#squid/sbin/squid -k reconfigure
This is probably used more often. When you find that your When the configuration is not what you want, you can modify squid.conf at any time, and don't forget to troubleshoot your squid.conf, and then execute this command to make running Squid run according to your squid.conf again.
7. Add squid to the system startup items
Edit /etc/rc.d/rc.localOf course, not everyone likes this startup method. You can use the method you are most comfortable with; or install it as a service.
Others
1. Modify the permissions of the cache directory.
#chown -R squid:squid /home/cacheMy cache directory is /home/cache, and the squid execution user and user group are squid, squid.
2. Modify the permissions of the squid log directory
#chown -R squid:squid /usr/local/squid/var/logsFor example, generate access.log cache.log store.log
3. Check your log document.
#more /usr/local/squid/var/logs/access.log | grep TCP_MEM_HITOf course, the blue text in this example can be modified to other parameters, such as your domain name. You can also see the line about the domain name in access.log.