[code]
[root@mach2 videocache-1.9.1]# squid -k parse
FATAL: Bungled squid.conf line 83: url_rewrite_program /usr/bin/python /usr/share/videocache/videocache.py
Squid Cache (Version 2.7.STABLE6): Terminated abnormally.
[/code]
[code]
[root@mach2 videocache-1.9.1]# cat /etc/httpd/conf/extra/httpd-videocache.conf
#
# file : /etc/httpd/conf.d/videocache.conf
#
# videocache is a squid url rewriter to cache videos from various websites.
# Check http://cachevideos.com/ for more details.
#
# ------------------- Note This --------------------
# Don't forget to reload httpd and squid services if you change this file.
Alias /videocache /squid/videocache
Options +Indexes
Order Allow,Deny
#Comment the following line and uncomment the next for public use
Allow from all
#Deny from all
[/code]
[code]
Include conf/extra/httpd-videocache.conf
[/code]
I only changed this directive below
[code]
[root@mach2 videocache-1.9.1]# cat /etc/videocache.conf
base_dir = /squid/videocache/
[/code]
[code]
[root@mach2 videocache-1.9.1]# cat /usr/sbin/update-vc | grep squid
# The user which runs the squid proxy server or daemon. Change this according to your system.
squid_user = 'proxy'
# The group which runs the squid proxy server or daemon. Change this according to your system.
squid_group = 'proxy'
[/code]
[code]
# main config
http_port 3128
visible_hostname rixserv
#email_err_data off
cache_mgr rixadmin@rixserv
# main config
cache_dir aufs /squid/cache 8192 16 256
cache_mem 64 MB
maximum_object_size 64 MB
maximum_object_size_in_memory 64 KB
# tweaks
cache_replacement_policy heap LFUDA
cache_swap_low 90
cache_swap_high 95
memory_pools off
quick_abort_min 0 KB
quick_abort_max 0 KB
log_icp_queries off
client_db off
buffered_logs on
half_closed_clients off
# addons
#url_rewrite_program /etc/adzapper/wrapzap
#url_rewrite_children 10
#url_rewrite_bypass on
redirect_program /usr/local/bin/squid_redirect
# acl
acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl rixnet src 192.168.0.0/24
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow rixnet
http_access allow localhost
http_access deny all
delay_pools 1
delay_class 1 2
delay_access 1 allow rixnet
delay_access 1 deny all
delay_parameters 1 100000/100000 90000/90000
hierarchy_stoplist cgi-bin ?
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern (cgi-bin|\?) 0 0% 0
refresh_pattern . 0 20% 4320
forwarded_for off
access_log /var/log/squid/access.log squid
coredump_dir /var/cache/squid
# --BEGIN-- videocache config for squid
url_rewrite_program /usr/bin/python /usr/share/videocache/videocache.py
url_rewrite_children 7
acl videocache_allow_url url_regex -i \.youtube\.com\/get_video\?
acl videocache_allow_url url_regex -i \.googlevideo\.com\/videoplayback \.googlevideo\.com\/videoplay \.googlevideo\.com\/get_video\
?
acl videocache_allow_url url_regex -i \.google\.com\/videoplayback \.google\.com\/videoplay \.google\.com\/get_video\?
acl videocache_allow_url url_regex -i \.google\.[a-z][a-z]\/videoplayback \.google\.[a-z][a-z]\/videoplay \.google\.[a-z][a-z]\/get_
video\?
acl videocache_allow_url url_regex -i (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4
][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/videoplayback\?
acl videocache_allow_url url_regex -i (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4
][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/videoplay\?
acl videocache_allow_url url_regex -i (25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4
][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\/get_video\?
acl videocache_allow_url url_regex -i proxy[a-z0-9\-][a-z0-9][a-z0-9][a-z0-9]?\.dailymotion\.com\/
acl videocache_allow_url url_regex -i vid\.akm\.dailymotion\.com\/
acl videocache_allow_url url_regex -i [a-z0-9][0-9a-z][0-9a-z]?[0-9a-z]?[0-9a-z]?\.xtube\.com\/(.*)flv
acl videocache_allow_url url_regex -i bitcast\.vimeo\.com\/vimeo\/videos\/
acl videocache_allow_url url_regex -i va\.wrzuta\.pl\/wa[0-9][0-9][0-9][0-9]?
acl videocache_allow_url url_regex -i \.files\.youporn\.com\/(.*)\/flv\/
acl videocache_allow_url url_regex -i \.msn\.com\.edgesuite\.net\/(.*)\.flv
acl videocache_allow_url url_regex -i media[a-z0-9]?[a-z0-9]?[a-z0-9]?\.tube8\.com\/ mobile[a-z0-9]?[a-z0-9]?[a-z0-9]?\.tube8\.com\/
acl videocache_allow_url url_regex -i \.mais\.uol\.com\.br\/(.*)\.flv
acl videocache_allow_url url_regex -i \.video[a-z0-9]?[a-z0-9]?\.blip\.tv\/(.*)\.(flv|avi|mov|mp3|m4v|mp4|wmv|rm|ram)
acl videocache_allow_url url_regex -i video\.break\.com\/(.*)\.(flv|mp4)
acl videocache_allow_dom dstdomain .mccont.com dl.redtube.com .cdn.dailymotion.com
acl videocache_deny_url url_regex -i http:\/\/[a-z][a-z]\.youtube\.com http:\/\/www\.youtube\.com
url_rewrite_access deny videocache_deny_url
url_rewrite_access allow videocache_allow_url
url_rewrite_access allow videocache_allow_dom
redirector_bypass on
# --END-- videocache config for squid
[/code]
[code]
[root@mach2 videocache-1.9.1]# cat /usr/share/videocache/config.py | grep squid/videocache
base_dir = Option('/squid/videocache/')
[/code]
[code]
tar -xvzf videocache-1.9.1.tar.gz
cd videocache-1.9.1
cp videocache-httpd.conf /etc/httpd/conf/extra/httpd-videocache.conf
cp videocache-sysconfig.conf /etc/videocache.conf
cp update-vc /usr/sbin/update-vc
chmod 744 /usr/sbin/update-vc
cp scripts/vccleaner /usr/sbin/vccleaner
chmod 744 /usr/sbin/vccleaner
cp -r videocache /usr/share/
cd /squid
mkdir -p videocache/tmp videocache/youtube videocache/metacafe videocache/dailymotion videocache/google videocache/redtube videocache/xtube videocache/vimeo videocache/wrzuta videocache/youporn videocache/soapbox videocache/tube8 videocache/tvuol videocache/bliptv videocache/break
chown -R proxy:proxy videocache
chmod -R 755 videocache
mkdir -p /var/log/videocache
chmod -R 755 /var/log/videocache/
chown -R proxy:proxy /var/log/videocache/
[/code]
I don't know what I'm doing wrong. Please help thanks!
