Link to home
Start Free TrialLog in
Avatar of rajasekarramasamy
rajasekarramasamyFlag for India

asked on

deny_info in squid

I want to display my own customized ERROR info page in squid. This is my configuration as mention below.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<CONFIG-START>>>>>>>>>>>>>>>>>>>>>

acl intranetsite src 192.1681.17
acl Blockbykeywords url_regex -i "/etc/blockbywords"
http_access allow intranetsite
deny_info ERROR_BLOCKBY_WORD Blockbykeywords
http_access deny Blockbykeywords !intranetsite

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<CONFIG-END>>>>>>>>>>>>>>>>>>>>>

I have placed my custom error info page in squid error directory. My custom error page also displaying when any blocked word match. The problem is my custom error info page is not displaying after i excluded intranetsite in Blockkeywords deny statement. Instead of my custom error page it displaying default ERR_ACCESS_DENIED page.

Any solution?.


Avatar of Gabriel Orozco
Gabriel Orozco
Flag of Mexico image

at your errors directory you will find all the pages shown in the diferent error states:
$ cd errors
$ ls
ERR_ACCESS_DENIED            ERR_DNS_FAIL           ERR_FTP_NOT_FOUND     ERR_INVALID_REQ   ERR_ONLY_IF_CACHED_MISS  ERR_TOO_BIG
ERR_CACHE_ACCESS_DENIED      ERR_FORWARDING_DENIED  ERR_FTP_PUT_CREATED   ERR_INVALID_RESP  ERR_READ_ERROR           ERR_UNSUP_REQ
ERR_CACHE_MGR_ACCESS_DENIED  ERR_FTP_DISABLED       ERR_FTP_PUT_ERROR     ERR_INVALID_URL   ERR_READ_TIMEOUT         ERR_URN_RESOLVE
ERR_CANNOT_FORWARD           ERR_FTP_FAILURE        ERR_FTP_PUT_MODIFIED  ERR_LIFETIME_EXP  ERR_SHUTTING_DOWN        ERR_WRITE_ERROR
ERR_CONNECT_FAIL             ERR_FTP_FORBIDDEN      ERR_FTP_UNAVAILABLE   ERR_NO_RELAY      ERR_SOCKET_FAILURE       ERR_ZERO_SIZE_OBJECT


you need to customize the file "ERR_ACCESS_DENIED" which is also standard html
Avatar of rajasekarramasamy

ASKER

Hi Redimido,

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<CONFIG-START>>>>>>>>>>>>>>>>>>>>>

acl intranetsite src 192.1681.17
acl Blockbykeywords url_regex -i "/etc/blockbywords"
http_access allow intranetsite
deny_info ERROR_BLOCKBY_WORD Blockbykeywords
http_access deny Blockbykeywords !intranetsite

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<CONFIG-END>>>>>>>>>>>>>>>>>>>>>

My problem is if use this line means squid displaying its default ERROR_ACCESS_DENIED page.

deny_info ERROR_BLOCKBY_WORD Blockbykeywords
http_access deny Blockbykeywords !intranetsite

If i remove the execluded in this line means it working fine squid displaying my custom error pages. This is the problem i am facing.
ASKER CERTIFIED SOLUTION
Avatar of Gabriel Orozco
Gabriel Orozco
Flag of Mexico image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Any news?