Squid custom error pages
I am trying to setup a customer error page for our squid reverse proxy.
We have IP-Whitelisted some of our websites allowing potential customers to 'request a demo' after which their IP addresses will be added to the whitelist. Case 1: A customer visits our website (http://demo.oursite.com) without being in the whitelist Result: Code:
The following error was encountered while trying to retrieve the URL: http://demo.oursite.com Customer tries to access the following (https://demo.oursite.com) Result: Site does not load for them at all. Website unavailable message generated by their browser. Rather than seeing these results, we would like them to see our custom html file telling them to request a demo. I have tried editing the error message in the file on the sever, restarting squid but it still displays the same old message. Tail of /var/logs/cache.log: Code:
Every 2.0s: tail /var/logs/cache.log Wed Jun 20 04:22:37 2012 1) I would like the same effect whether they connect through HTTPS or HTTP. Why is it not connecting at all via HTTPS and showing the error message via HTTP? 2) Other than edit the error message file, what else must I do to get the customer error message displayed? squid.conf Code:
#ACLS and Debug options |
Quote:
Code:
cache_peer_access demo allow sites_demo darwin Regards |
Quote:
Sorry, that was a typo. They are all indeed demo. I've got it sorted anyway, I just edited templates/ERR_CANNOT_FORWARD to contain the custom error message. This works fine for http connections. Now all I need is to get https://demo.example.com to redirect to the error page instead of just timing out which it does now. So right now, everything within the whitelist is working as expected. For everyone else, HTTP:// connections redirect to our custom error page as expected but HTTPS:// connections time out. What do I have to change to make https connections forward to the error page also? Is there something like https_access allow all? Cheers |
Quote:
Anyway in this case, I guess you can change the ERR_CONNECT_FAIL page to your likings Regards |
Quote:
Also, within the white-listed IP addresses, clients are able to connect via HTTPS perfectly. If I attempt to connect via http outside of the whitelist, I get the custom error page and the following appears in the /var/logs/cache.log: Code:
2012/06/22 00:04:49| Failed to select source for 'http://demo.example.com/' EDIT: I found the problem. After re-reading my post, I decided to nmap the server and found only port 80 visible. It turns out i had a firewall-like system blocking it. All working fine now. Thanks for the reply. |
All times are GMT -5. The time now is 03:47 AM. |