Commands for new proxy Scripts

1:Create file
touch /etc/fw.sh

2:Change permissions
chmod +x /etc/fw.sh

3:Edit File
nano /etc/fw.sh

(Add the script simple internet sharing)

4:Run
/etc/fw.sh

5:Place shortcut
/etc/rc.local

6:Upgrade DNS
apt-get install dnsmasq

7:Update system
apt-get update

8:Install Squid
apt-get install squid

9:Edit squid.conf
nano /etc/squid/squid.conf

(Add the script squid.conf)

10:create storeurl.pl
touch /etc/squid/storeurl.pl
chmod +x /etc/squid/storeurl.pl

11:Edit store URL
nano /etc/squid/storeurl.pl
(Add store URL Script)

12:Install Nginx
apt-get install nginx

13:Edit Nginx.conf
nano /etc/nginx/nginx.conf

(Delete all lines in Nginx.conf)
(Donot Add the script Nginx.conf)

14:Create directories to hold cache files
mkdir /usr/local/www
mkdir /usr/local/www/nginx_cache
mkdir /usr/local/www/nginx_cache/tmp
mkdir /usr/local/www/nginx_cache/files
chown www-data /usr/local/www/nginx_cache/files/ -Rf

15:create nginx.rb file
touch /etc/nginx/nginx.rb
chmod 755 /etc/nginx/nginx.rb

16:edit Nginx.rb
nano /etc/nginx/nginx.rb

(Add script Nginx.rb)

17:Install Ruby
apt-get install ruby

18:create cache dir
mkdir /cache1
chown proxy:proxy /cache1
chmod -R  777 /cache1

19:Start dir
squid -z

20:Start squid
service squid start

21:Restart Nginx
service nginx restart

22:Chek cached videos
ls -lh /usr/local/www/nginx_cache/files

23:chek cache hit
tail -f /var/log/squid/access.log | grep HIT