connect database to squid proxy server
hi all..
i have a problem about how to connect the database to proxy server. example:: this is the acl in squid.conf to block the website.the keyword that want to block store in file .txt acl block_advertisers urlpath_regex -i “/etc/squid/ block_advertisers.txt” acl block_entertainment urlpath_regex -i “/etc/squid/ block_entertainment.txt” acl block_webmail urlpath_regex -i “/etc/squid/ block_webmail.txt” acl block_porn urlpath_regex -i “/etc/squid/ block_porn.txt” and this is the activation:- http_access deny block_advertisers http_access deny block_entertainment http_access deny block_porn http_access deny block_webmail what i need to do is to convert the place of storing the url from the file .txt to 1 database. i already create a database using LAMP name websiteblocking and create a table name block_advertisers, block_entertainment, block_porn, and block_webmail and store the data followed the table. here the problem is i have failed to connect the squid proxy server(squid 2.7stable9) to the database. i have try this but its not success. acl websiteblocking urlpath_regex -i "/etc/sbin/squid/websiteblocking" acl db-auth proxy_auth_regex REQUIRED http_access deny websiteblocking acl QUERY url_path cgi-bin /? no_cache deny QUERY a bit info, the data that stored in database is a keyword to block the website if a keyword in blacklist match with the url that want access by user. if match so then the user cannot access the website. this project is like to centralize the data.hope anyone can help me and please correct me if i'm doing wrong... thanks in advance.sorry for my bad english..tq |
Which version of squid are you using?
And what do the files you're trying to include look like? Cheers, Tink |
Quote:
hi Tinkster, thanks for your reply. i used squid version 2.7 STABLE9. errr.. i dont know how to explain about the files.. but here what i want to know, how to call database that i store all the blacklist keyword to block URL. currently in squid configuration, the blacklist keyword save in file .txt by the category. now the data in file .txt i store in one database by the table. in this way no need to call every file .txt , i just used one ACL command to call database to filter the blacklist keyword. or in simple word i want to know how to connect the data that save out of squid... |
Sorry mate, you lost me there ... I have no idea how *txt and
database hang together, and your explanation, lengthy as it is, doesn't actually clarify your intentions to me at all; hope someone other than myself can fathom what you're after. Cheers, Tink |
Quote:
i want store the blacklist keyword in database not in file .txt ... have many example to store blacklist keyword in file .txt but dont have example for storing in database. its ok if u cant get me. anyway tq very much to your effort to help.. i really appreciate it |
Ok, I think I *do* understand now. And if I read the docu for
squid correctly you're out of luck; the only database usage is to use MySQL for authentication - to achieve what you want you'll have to a) use a different tool, e.g., Squidard or b) hack squid's source to make it do what you want. Cheers, Tink |
Quote:
tq Tink. i have 2 idea to settle it. 1st, used acl element: pathurl_regex, change at squid configuration-but still try it,try and error.2nd,squid connect to file .txt and in this file do the php programming to call dbase..this one not try yet, still try to create the php script to call the dbase |
All times are GMT -5. The time now is 07:30 AM. |